I am automating a Mail Merge process in my application. The data source is an Excel workbook created eariler by the application. I specify the Excel workbook as the data source and the named range as the "Connection". It works fine except that a dialog box is displayed by Word with the caption "Select Table" with the specified named range highlighted. I have to manually click "OK" for the named range to be used as the table and then the Mail Merge completes successfully.
Is there is a way to suppress the "Select Table" dialog box which is displayed during the processing of the myDoc.MailMerge.OpenDataSo
myDoc = appWord.Documents.Open(dotFile)
PasswordDocument:="", PasswordTemplate:="", _
SQLStatement:="SELECT * FROM 'Address Data$'", _