Macro/VB to turn on Update Fields & Links

Macro/VB to turn on Update Fields & Links

Post by S2FtcmF » Thu, 05 Apr 2007 05:46:04


I need help creating a macro I can insert into a Word document that will set
user options in Tools > Setup so that Update Fields and Update Links are
checked on the Print Tab. Thanks.
 
 
 

Macro/VB to turn on Update Fields & Links

Post by TGVuZSBGcm » Thu, 05 Apr 2007 06:28:02

The following code lines will turn on the "Update fields" and "Update links"
options in Tools > Options > Print tab:

With Options
.UpdateFieldsAtPrint = True
.UpdateLinksAtPrint = True
End With

See this article if you need help on installing macros:
http://www.yqcomputer.com/

Tip: If you record a macro while changing options settings, you will most
likely be able to find out which VBA code correspond to which settings.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

 
 
 

Macro/VB to turn on Update Fields & Links

Post by S2FtcmF » Thu, 05 Apr 2007 06:52:02

Thanks. I forgot to mention that it needs to run when the user opens the
document -- what can I add to it?
 
 
 

Macro/VB to turn on Update Fields & Links

Post by TGVuZSBGcm » Thu, 05 Apr 2007 07:08:00

You could insert the code in a macro named "AutoOpen" and store the macro in
a code module in the document:

Sub AutoOpen
[insert the code here]
End Sub

For further information about auto macros, see "Running a macro
automatically when a document is created, opened or closed":
http://www.yqcomputer.com/

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
 
 

Macro/VB to turn on Update Fields & Links

Post by S2FtcmF » Thu, 05 Apr 2007 23:38:01

Thanks for the tip, Lene. Nothing like getting assistance from Denmark on a
Word problem in Washington, DC!