View Single Post
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

There's nothing at all in that code that has anything to do with mailmerge.
Did you post the right code?

Check out the Mailmerge item in the Visual Basic Help file for details on
how to use vba to execute a mail merge.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Virgil" wrote in message
...
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