Originally Posted by
ShogunPatch
Is there a way to avoid the user having to click on "Yes" for the macro to run? I have tried experimenting with switching Application.DisplayAlerts on and off and also with SendKeys, so far without success
Setting:
Application.DisplayAlerts = wdAlertsNone
before you open the mailmerge main document will suppress the SQL prompt, but it will also kill the mailmerge - in which case you macro becomes responsible for re-establishing all the mailmerge parameters (mailmerge type, datasource, and so on).
Alternatively, there is a registry edit, but that is user-specific and affects all mailmerge main documents opened by that user.