View Single Post
  #2   Report Post  
Posted to microsoft.public.dotnet.languages.vb,microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default Mailmerge Automation Problems

Hi Chubbly,

Hope you can help. I have created a mail merge word doc which seems to work
fine. When I close and reload it asks if I wish to pull in the data.
Great.

However, I want to print the results of the mail merge from within a VB.Net
app. I can create and load the word app/doc, but the document is not opened
as a mail merge doc. In fact the mail merge fields just appear as text.

It would help if you'd show us the code you're using... You also need to tell
us which version of Word you're testing on, which versions are targeted, what
type of data source is involved and, if you know, which connection method is
being used.

My best guess would be you're running into this:
"Opening This Will Run the Following SQL Command" Message When You Open a Word
Document - 825765
http://support.microsoft.com?kbid=825765

In an automation environment, where this security measure is activated, you
MUST use the OpenDataSource method to connect the data after the document is
opened. The data source is unlinked without question when a mail merge document
is opened by automation.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)