From: mokshadavid on
I have a Word 2003 form in which USERS enter "earned income" amounts in
fields and when they click outside the field, the total calculates using a
formula in a different table cell. The formula will show the sum total amount
of all "earned income" entered in the above table cells/input fields when the
field "calculates on exit" properly.

My problem is that Users are entering their final "earned income" amount,
and then (WITHOUT clicking outside the cell/field), the USER hits PRINT,
which does not let the field "calculate on exit", so that "earned income"
amount doesn't show up in my formula total.

How can I get all fields to calculate before a USER hits PRINT? Is there a
VBA code to use to force this? I don't want to have to tell users they have
to click outside the cell always, because I would rather the form do it
automatically somehow. Any help is appreciated.

It defeats the purpose of a formula in my form unless I can guarantee that
all the "earned income" amount are showing up in the total.

From: Doug Robbins - Word MVP on
You could include macros with the names of FilePrint() and
FilePrintDefault() in your template that contained code the update the
fields in the document before displaying the File Print Dialog or printing
the document respextively.
--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"mokshadavid" <mokshadavid(a)discussions.microsoft.com> wrote in message
news:5F29C020-A054-4C08-879F-603043EDC891(a)microsoft.com...
>I have a Word 2003 form in which USERS enter "earned income" amounts in
> fields and when they click outside the field, the total calculates using a
> formula in a different table cell. The formula will show the sum total
> amount
> of all "earned income" entered in the above table cells/input fields when
> the
> field "calculates on exit" properly.
>
> My problem is that Users are entering their final "earned income" amount,
> and then (WITHOUT clicking outside the cell/field), the USER hits PRINT,
> which does not let the field "calculate on exit", so that "earned income"
> amount doesn't show up in my formula total.
>
> How can I get all fields to calculate before a USER hits PRINT? Is there
> a
> VBA code to use to force this? I don't want to have to tell users they
> have
> to click outside the cell always, because I would rather the form do it
> automatically somehow. Any help is appreciated.
>
> It defeats the purpose of a formula in my form unless I can guarantee that
> all the "earned income" amount are showing up in the total.
>

From: mokshadavid on
Thanks, those specific commands worked. The only thing is, when I use the
Sub FilePrint() to capture when they go File>>Print, then it doesn't bring up
the print dialog box anymore it just prints.

Here is my code (it works), if I could do it better, let me know...thanx for
your help:

Sub FilePrintDefault()
Application.ScreenUpdating = False
ActiveDocument.Fields.Update
ActiveDocument.PrintOut
End Sub

Sub FilePrint()
Application.ScreenUpdating = False
ActiveDocument.Fields.Update
ActiveDocument.PrintOut
End Sub
From: Doug Robbins - Word MVP on
Replace

ActiveDocument.PrintOut

with

Dialogs(wdDialogFilePrint).Show

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"mokshadavid" <mokshadavid(a)discussions.microsoft.com> wrote in message
news:E6B07AE1-8011-4770-ADC7-FA2B7D8C70A0(a)microsoft.com...
> Thanks, those specific commands worked. The only thing is, when I use the
> Sub FilePrint() to capture when they go File>>Print, then it doesn't bring
> up
> the print dialog box anymore it just prints.
>
> Here is my code (it works), if I could do it better, let me know...thanx
> for
> your help:
>
> Sub FilePrintDefault()
> Application.ScreenUpdating = False
> ActiveDocument.Fields.Update
> ActiveDocument.PrintOut
> End Sub
>
> Sub FilePrint()
> Application.ScreenUpdating = False
> ActiveDocument.Fields.Update
> ActiveDocument.PrintOut
> End Sub