Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update fields automatically.

Status
Not open for further replies.

toffa

Programmer
Aug 24, 2004
77
AU
Hi all
I have a word document that opens from access and details area compiled relating to a current record. I have got this to work great however to get the feilds in word to reference the book marks i need to update the feilds. Now the manual way to do this is to select all and and press f9, what i was wandering is there someway of automating this process or to even set up a button to do it.

Chris
 
Have you tried recording a macro to do it? You could then use that code in an AutoOpen event, or just drag that macro up to any toolbar as a macro button.

Gerry
 
Try:

Sub AutoOpen()
ActiveDocument.Fields.Update
End Sub

This will update all fields in the body of the document. If you also need to update fields in headers/footers or shapes, that'll require more code.

Cheers
 
Under Tools, Options, General tab, do you have Update Fields on Open option checked?

Regards: tf1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top