WD: How to Add a PREPAID or DEPOSIT Row to the Invoice Template
ID: Q117705
|
The information in this article applies to:
-
Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
-
Microsoft Word for Windows NT, version 6.0
-
Microsoft Word for Windows 95, versions 7.0, 7.0a
-
Microsoft Word 97 for Windows
-
Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
-
Microsoft Word 98 Macintosh Edition
SUMMARY
This article describes how to add a PREPAID or DEPOSIT row to the Invoice
template.
MORE INFORMATION
Microsoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language being demonstrated and the tools used to create and debug
procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to
provide added functionality or construct procedures to meet your specific
needs. If you have limited programming experience, you may want to contact
the Microsoft fee-based consulting line at (800) 936-5200. For more
information about the support options available from Microsoft, please see
the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/
Use the following steps to add a PREPAID or DEPOSIT row to the bottom of
the Invoice.
Word 97 for Windows or Word 98 Macintosh Edition
- Copy the Invoice.dot file to your templates folder. The Invoice.dot
file shoudl be located in the "ValuPack\Template\Word" folder
(Windows) or the "ValuPack\Template\Word\Additional Word
Templates" folder (Macintosh) on the Office or Word compact disc.
- Open the Invoice template (Invoice.dot) file.
- On the Tools menu, click Unprotect Document.
- Position the insertion point at the beginning of the SALES TAX cell.
- On the Table menu, click Insert Rows.
A new row should appear between the SUBTOTAL and SALES TAX rows.
- In the first cell of the new row, type PREPAID or DEPOSIT.
Your modified table should now appear as follows:
SUBTOTAL| **** | <- cell D9 (contains a FORM field)
DEPOSIT| | <- cell D10 (blank)
SALES TAX| **** | <- cell D11 (contains a FORM field)
SHIPPING & HANDLING| **** | <- cell D12 (contains a FORM field)
TOTAL DUE| **** | <- cell D13 (contains a FORM field)
- Position the insertion point in the second cell of the new row (cell
D10 in the above diagram).
- On the View menu, point to Toolbars, and then click Forms.
- Click the Text Form Field button on the Forms toolbar.
- Double-click the form field.
- In the Text Form Field Options dialog box, select the following
settings and then click OK:
- In the Type box, select Number.
- Under Run Macro On, select Update_.Main from the Exit list.
- Under Field Settings, type Deposit or Prepaid in the Bookmark box.
- In the Number Format list, select the fifth format:
$#,##0.00;($#,##0.00)
- Leave all the other settings at their default values.
- Double-click the FORM field to the right of the TOTAL DUE cell (cell
D13 in the diagram in step 5). The Text Form Field Options dialog
box should be displayed.
- In the Text Form Field Options dialog box, modify the entry in the
Expression box so that it reads as follows, and then click OK:
=SUM(D9,D11,D12)-SUM(D10)
- Use the following instructions to modify the Update macro:
- On the Tools menu, point to Macro, and then click Macros.
- In the Macro Name list, click Update_.Main, and then click
the Edit button.
- In the macro editing window, change this portion of the macro
If fieldName$ = "Shipping" Or fieldName$ = "SalesTax" Then
Goto TOTAL
EndIf
to the following:
If fieldName$ = "Shipping" Or fieldName$ = "SalesTax" _
Or fieldName$ = "Deposit" Then
Goto TOTAL
EndIf
NOTE: In this macro, "Deposit" is the bookmark name you set in
step 11. If you set a different bookmark name in step 11,
use that name instead of "Deposit" in the Update macro.
- On the File menu in the Visual Basic Editor, click "Close and Return
to Microsoft Word."
- On the Tools menu, click Protect Document. Select the Forms option,
and then click OK.
- Save and close the Invoice template.
Word 6.x, 7.x
- Open the Invoice template (Invoice.dot) file.
- On the Tools menu, click Unprotect Document.
- Position the insertion point at the beginning of the SALES TAX cell.
- On the Table menu, click Insert Rows.
A new row should appear between the SUBTOTAL and SALES TAX rows.
- In the first cell of the new row, type PREPAID or DEPOSIT.
Your modified table should now appear as follows:
SUBTOTAL| **** | <- cell D9 (contains a FORM field)
DEPOSIT| | <- cell D10 (blank)
SALES TAX| **** | <- cell D11 (contains a FORM field)
SHIPPING & HANDLING| **** | <- cell D12 (contains a FORM field)
TOTAL DUE| **** | <- cell D13 (contains a FORM field)
- Position the insertion point in the second cell of the new row (cell
D10 in the above diagram).
- On the Insert menu, click Form Field.
- Select the Text option, and then click the Option button.
- In the Text Form Field Options dialog box, select the following
settings and then choose OK:
- In the Type box, select Number.
- Under Run Macro On, select Update from the Exit list.
- Under Field Settings, type Deposit or Prepaid in the Bookmark box.
- Leave all the other settings at their default values.
- Double-click the FORM field to the right of the TOTAL DUE cell (cell
D13 in the diagram in step 5 above). The Text Form Field Options dialog
box should open.
- In the Text Form Field Options dialog box, modify the entry in the
Expression box so it reads as follows, and then choose OK:
=SUM(D9,D11,D12)-SUM(D10)
- Use the following instructions to modify the Update macro:
- On the Tools menu, click Macro. In the Macro Name list, click
Update, and then click the Edit button.
- In the macro editing window, change this portion of the macro
If fieldName$ = "Shipping" Or fieldName$ = "SalesTax" Then
Goto TOTAL
EndIf
to the following:
If fieldName$ = "Shipping" Or fieldName$ = "SalesTax" _
Or fieldName$ = "Deposit" Then
Goto TOTAL
EndIf
NOTE: In the this macro, "Deposit" is the bookmark name you set in
step 9. If you set a different bookmark name in step 9, use
that name instead of "Deposit" in the Update macro.
- Close the macro editing window and choose Yes when Word prompts you to
save changes.
- On the Tools menu, click Protect Document. Select the Forms
option and then click OK.
- Save and close the Invoice template.
REFERENCESWord 97 and Word 98 Macintosh Edition
For more information about online forms, click the Office Assistant,
type "Online Forms," click Search, and then click to view "Designing a
form."
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If Word Help is not installed on your computer,
please see the following article in the Microsoft Knowledge Base:
Q120802 Office: How to Add/Remove a Single Office Program or Component
Word 6.x, 7.x
For more information about the Invoice template, double-click the Help
button on the Standard toolbar, and then type "readme" (without the
quotation marks). In Word Readme Help, select the Word for Windows Product
Update topic, and then select the Supplied Online Business Forms topic.
Additional query words:
financial
Keywords : kbtemplate kbtable
Version : MACINTOSH:6.0,6.0.1,6.0.1a,98; WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97; winnt:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type :
|