Update fields automatically upon opening doc

H

Herschlag

Is there a way to update fields automatically
(filename/path) without having to print the file. I also
don't want to do a "select all" and hit f9 to update. I
thought there was a way to run a macro as soon as you
would open a file that would update fields.
 
J

Jay Freedman

Herschlag said:
Is there a way to update fields automatically
(filename/path) without having to print the file. I also
don't want to do a "select all" and hit f9 to update. I
thought there was a way to run a macro as soon as you
would open a file that would update fields.

Sub AutoOpen()
Options.UpdateFieldsAtPrint = True
Application.ScreenUpdating = False
PrintPreview = True
PrintPreview = False
ActiveDocument.ActiveWindow.View.Type = wdPrintView
Application.ScreenUpdating = True
End Sub
 
D

David Harrison

My thanks to Jay for this little macro - it's cured a
minor headache that I've had for ages which is "Select
All +F9" doesn't update fields in the footer whereas your
macro does - three cheers from me at least.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top