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
|