View Single Post
  #1   Report Post  
Virgil
 
Posts: n/a
Default Mail Merge VBA problem in Word/Access 2003

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 2002 database. The variables are
fine. It creates an active document from a template but
it does NOT merge the data.

With gappWord
..Selection.WholeStory
..Selection.Fields.Update
..Selection.HomeKey Unit:=wdStory
..ActiveDocument.SaveAs gstrJobsheetsPath & strNewFileName
..Visible = True
..ActiveWindow.WindowState = wdWindowStateMaximize
..Activate
End With