I wrote the following code:
DoCmd.OutputTo acOutputTable, "tmpWorkSheet", acFormatXLS,
"C:\WS.xls", False, ""
Set oWordDoc = CreateObject("Word.Application")
oWordDoc.Application.Visible = True
'open word document
oWordDoc.Application.Documents.Open "C:\TESAOD_1.doc"
'assign datasource
With oWordDoc.Application.ActiveDocument.MailMerge
.MainDocumentType = 0
.OpenDataSource Name:="C:\WS.xls", Linktosource:=True, _
Connection:="tmpworksheet"
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.EditMainDocument
.Execute Pause:=True
End With
The problem I am experiencing is that when the worddoc opens up at the
same time a popup appears asking the user to select the table
("tmpWorkSheet").
How can I get rid of this annoying popup?
Please help!!!
Thank you so much in advance,
Stefania