View Single Post
 
Old 05-19-2011, 04:26 AM
PhilAJ PhilAJ is offline Windows XP Office 2007
Novice
 
Join Date: Apr 2011
Posts: 7
PhilAJ is on a distinguished road
Default Automating Mailmerge from Access

Hi

I've written some code that automates a mailmerge from a form in MSacess - and it works fine...BUT...

straight after the code line

Set objWord = GetObject(stDocName, "Word.Document")

the word document opens and prompts with "Opening this document will run with the following command....etc etc " and asking for a YEs/No answer; even though my code will then the datasource and do the merge,

objWord.MailMerge.OpenDataSource Name:="C:\Temp\abc.txt", linktosource:=True
objWord.Application.Visible = True
objWord.MailMerge.Execute

Does anyone know of any way to STOP word prompting - and just continue and do the merge?

Thanks in advance

Phil
Reply With Quote