View Single Post
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Cindy M -WordMVP-
 
Posts: n/a
Default Using macro, mail merge, access

Run-time error '4605':

This method or property is not available because the document is not a
mail merge main document.

When I try to debug it, it shows the line:
objDoc.MailMerge.Execute

When I open the document I always have to open the data source. I
believe this is the reason why this is happening. When it tries to run
the Mail Merge, it doesn't have any data source to use.

Yes, it would have to have a data source attached...

By default, for Word 2002 with SP and Word 2003, if a document is opened
via automation the SQL security check will remove the data source. If you
link the mail merge document, save, close and re-open to you get a
message about SQL executing, and whether Word should continue?

If this is the case, first see this KB article:
"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765
http://support.microsoft.com?kbid=825765

Is there a way for the Data Source to Open when I open the document
automatically?


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 :-)