Mail Merge VBA problem in Word/Access 2003

V

Virgil

Folks, I'm tearing my hair out trying to find out WHY this
VBA code doesn't merge data into a Word 2003 template! The
code is used in an Access 2000/2002/2003 database. The
variables are fine, and the code works fine in Access 2000
(MS Word 9.0 Object Library), creating and merging data
into a new document. But in Access 2003 (MS Word 11.0
Object Library) it only creates an active document from a
template without merging the data, hence the mystery.

With gappWord
.Documents.Add strTemplatesPath & strDotName
.Selection.WholeStory
.Selection.Fields.Update
.Selection.HomeKey Unit:=wdStory
.ActiveDocument.SaveAs strPath & strNewFileName
.Visible = True
.ActiveWindow.WindowState = wdWindowStateMaximize
.Activate
End With
 

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