A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

automatically update field codes



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2004, 03:13 AM
Simone
external usenet poster
 
Posts: n/a
Default automatically update field codes

I have inserted a SaveDate field code in a template. I
would like the field to update automaticcally when the
document is saved without having to F9 it or wait for
update when printing. Is there a formula of some kind that
will automatically update the field whenever the document
is saved?
  #2  
Old June 3rd, 2004, 06:55 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default automatically update field codes

Hi Simone,

The vba command

Assuming that the field is in the footer of the document, the easiest way to
get the fields to update is to preview the document. You can use the
following vba commands to do that

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

If you were to create a macro with the name

FileSaveAs that contains the following code

Dialogs(wdDialogFileSaveAs).Show
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

Then it would run whenever the FileSave As command is selected and should
do what you want.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"Simone" wrote in message
...
I have inserted a SaveDate field code in a template. I
would like the field to update automaticcally when the
document is saved without having to F9 it or wait for
update when printing. Is there a formula of some kind that
will automatically update the field whenever the document
is saved?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.