View Single Post
  #5   Report Post  
Virgil
 
Posts: n/a
Default

I'm not sure what your point is because this is actual VBA
code from an Access 2000 function which DOES execute a
mail merge in a Word 2000 document using an Excel
spreadsheet. It based on code from Helen Feddema's
book "Expert One-on-One Microsoft Access Application
Development". Now this same code doesn't work in
Access/Word 2003 and I'm trying to find out what changes
to make to make it execute a mail merge rather that just
give me a new document that hasn't been merged with the
data source.
-----Original Message-----
I can only repeat what I said before, there is nothing at

all in that code
that has anything to do with mailmerge.

--
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
...
Yes. That's code from the Access VBA using MS Word 9.0
Object Library. Also shoudl have said that the code

works
fine in Access 2000. I'll post this problem in the

Acess
area.

-----Original Message-----
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


.



.