Extracting information to a Word mail merge

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having a problem with Word 2003, in my program I extract out information
for a mail merge, I then start up Word using the merge template I want. This
works just fine with all other words except 2003. I get a message that
states "Opening this document will run the following SQL command "Select *
from ........" Data from your database will be placed in the document. Do
you want to continue? At this point I select "Yes" the document opens but
when I go to the tools and select the Letter and Merge the mail merge is
grayed out. Now if I start Word directly from the desktop I still get the
same message but when I answer "Yes" and the document comes up I'm able to
select Tools and when I select "Letter and Merge" the Mail Merge is dark and
I can select it and the merge works fine.
The command lines I use in my program are as follows:
apppath = Application.CurrentProject.Path
Set wrdObject = GetObject("" & apppath & "" + "\" & wrddoc & "")
wrdObject.Application.Visible = True

Any help is appreciated.

Tom
Does anybody know why Word 2003 will not work when called up in my access
program?
 
Hum, I have sample that does a merge for a2003.

Give the sample a try...if it works, then we know that we can get rid of the
prompt.

The sample of mien can be found here, it is also manages templates, and
allows you to merge from any form with ONE line of code. So, you might just
want to use my sample code (there is instructions on how to use it with
existing applications).

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
 
Back
Top