Hello - This is an Access/Word 2003 app, with some pretty involved mail merge operations.
The mail merge doc's have a lot of IF fields that set different text into the letters, based on data values in the datasource (different account types from record to record).
They also have INCLUDEPICTURE fields to bring in the signature jpg's of the various cust service rep's, based on their user ID's I plant in the datasource (also varies from record to record).
After I "Mail Merge To A New Document", I have to press Control/A to select the entire thing (hundreds of letters, on average), and then press F9 to update the fields and links. I'd like to do that in code, but I don't see any likely-looking methods of the Document object to do that.
How do you, in VBA, from the Access side, do a Control/A followed by F9? (code snip below)
(I just thought about doing it with SendKeys, but there has to be an object method?)
Dim objWordApp As Word.Application
Dim objWordDoc As Word.Document
Dim objWordMrg As Word.Document
Set objWordApp = CreateObject("Word.Application")
objWordApp.Visible = True
Set objWordDoc = objWordApp.Documents.Open("C:\MyMailMergeLetter.doc")
SQLStatement:="SELECT * FROM [tblMyMailMergeDataSource]"
Set objWordMrg = objWordApp.ActiveDocument