Controlling Word - Update Fields

willpower

Registered User.
Local time
Today, 09:15
Joined
Apr 25, 2007
Messages
10
Hi all,

I'm trying to control Word Mailmerge docs through my Access VBA
Through a convoluted process which I'll avoid for now, I end up with a new (already merged) document in word. My Word object is named objWord and the merged document is objWord.ActiveDocument. From this, I use the following:

With objWord
.ActiveDocument.PrintOut False, False, wdPrintAllDocument, , , , , 1, , , False, True
.ActiveDocument.Close wdDoNotSaveChanges
End With

To print, then close the doc. My problem is that I now need to "Select All", then "UpdateFields" before printing the doc. Does anyone now which method I can use?

Any help greatly appreciated!

willpower
 
Solution

Aaarggh! Solved it...

objWord.ActiveDocument.Fields.Update

...for anyone who's interested.

Calls the Update method on the Fields collection!
 

Users who are viewing this thread

Back
Top Bottom