The only reason you'd get an SQL prompt is if the document is configured for a mailmerge. Setting Application.DisplayAlerts = wdAlertsNone not only eliminates the prompt but also destroys the mailmerge functionality. Ordinarily, that would therefore only be done when Word is being automated from another application that has its own copy of the SQL code and the automation restores DisplayAlerts when it's done. There is a registry patch for suppressing SQL prompts that does not destroy a mailmerge main document's functionality.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|