Customizing Invoice Template
Customizing invoice templates means creating
your own custom invoice workbooks that can
interact with the Excel Invoice
Manager COM add-in and connect to
databases to store and retrieve data.
Please read this chapter carefully
before customizing your workbook, as it
contains valuable implementation
information.
Contents
Creating
New Invoice Workbooks
Design
Mode
Protection
Gridlines
and Row/Column Headers
Names
ActiveX
Controls
Printing
Extracting
ActiveX Controls and Drawing Objects
Creating New Invoice Workbooks
An invoice workbook uses a number of hidden
properties and cells to identify itself as a
valid invoice workbook so that the
Excel Invoice Manager COM
add-in can and will interact with it. Because
of this, you can't create an invoice workbook
from scratch. You must create a new invoice
workbook based on an existing valid invoice
workbook. To do this, copy an existing invoice
workbook using your Windows Explorer, and
customize that copy to create your own invoice
workbook.
Design Mode
An invoice workbook has two states: design
mode and run mode. In design mode, the
Excel Invoice Manager COM
add-in will stop interacting with the invoice
workbook, so that you can move, add, or delete
controls or cells. To switch to design mode,
click the Design Mode button
on the Control Toolbox
toolbar. After customization, click this button
again to exit design mode.
Protection
By default, the Invoice
worksheet is protected. You need to unprotect
it for most of the customization work. To
unprotect the worksheet, click Excel menu
Tools ->
Protection ->
Unprotect Sheet.
It is strongly recommended that you protect
the worksheet again after your
customization.
Gridlines and Row/Column Headers
When customizing a workbook, it is very
helpful to display gridlines and row/column
headers.
- Click and activate the worksheet you want
to display gridlines and row/column headers
for.
- On the Tools menu, click
Options, and then click the
View tab.
- Under Window options,
check the Gridlines and
Row & Column Headers
check boxes.
After your customization, go back to the
Tools menu,
Options, View
tab. Under Window options,
REMOVE the checks you previously placed by the
two check boxes to hide gridlines and
row/column headers. This will restore the
appearance of your workbook.
Names
All objects in an invoice workbook,
including ActiveX controls, drawing objects and
cells, are identified by names. There are more
than 200 names used by Excel Invoice Manager,
and some of them are hidden. By using names,
you are free from the restrictions of cell
addresses and can move the objects around the
worksheet.
To distinguish from other names, all names
used by Excel Invoice Manager
are prefixed with okn
(Office-Kit.com's Name).
In Excel, names are available to any sheet.
For example, if the name oknID refers to the
range A20:A30 on the first worksheet in a
workbook, you can use the name oknID on any
other sheet in the same workbook to refer to
range A20:A30 on the first worksheet. However,
in Excel Invoice Manager, you
cannot move a cell (or a name) from one
worksheet to another.
To name a drawing object or cell:
- Click and select the cell or drawing
object.
-
Click the Name box at the
left end of the formula bar.

- Type the name in the
Name box.
- Press ENTER.
To name an ActiveX control object:
- Switch your workbook to design mode.
- Right click the ActiveX object.
- Select Properties from the menu.
- In the Properties
window, enter the name in the
Name field.
See your Excel help document for more
information about using names.
ActiveX Controls
Microsoft Excel has two types of controls.
ActiveX controls are appropriate for most
situations. Forms Toolbar Controls are
compatible with earlier versions of Excel,
beginning with Excel version 5.0, and can be
used on XLM macro sheets. Excel Invoice
Manager uses a number of standard
ActiveX controls, such as buttons, check boxes,
and graphics.
To add an ActiveX control:
- Switch your workbook to design mode.
- On the Control Toolbox
toolbar, click the control you want to
add.
- Click on the worksheet at the location
where you want to place the control.
- Drag the control to the size you
want.
- Right click the control and select
Properties from the
menu.
- Enter the name, caption, and other
properties if needed.
- Close the Properties
window.
- To quit design mode and enable the
ActiveX control, click Exit Design
Mode on the Control
Toolbox toolbar.
Printing
The PRINT_AREA Name
If a worksheet has defined a PRINT_AREA name
and it refers to a range of cells, Excel will
print the specified area instead of the whole
sheet when you click the Print
command on the Excel menu.
In the invoice workbook, each worksheet
contains a PRINT_AREA name. You can view what
the name refers to by selecting PRINT_AREA from
the Name box at the left end
of the formula bar. If you want to redefine the
PRINT_AREA name, follow the steps below:
- Select the area you want to print.
- Click Excel menu File
-> Print Area ->
Set Print Area.
Printing ActiveX Objects and Drawing
Objects
By default, all objects added to a worksheet
are printable. You may want to exclude some of
them from printing, such as the Customer
Selection button on the
Invoice worksheet.
To exclude a drawing object from
printing:
- Right click the drawing object, and
select Format AutoShape from
the menu.
- Click Properties
tab.
- Clear the Print Object
check box.
To exclude an ActiveX control from
printing:
- Switch the workbook to design mode.
- Right click the ActiveX control, and
select Properties from the
menu.
- Scroll down the properties list and find
the PrintObject
property.
- Change the PrintObject
property to False.
Extracting ActiveX Controls and Drawing
Objects
To make the extracted worksheet as clean as
possible, all ActiveX controls and drawing
objects will be removed from the extracted
worksheet. If you want to keep an ActiveX
control or a drawing object, add a prefix
oknUser_ or oknWidget_ to its
name.
|