Word 2003 - eliminating SQL dialog box

C

Candace

When I attempt to perform a particular merge, I get a dialog "Microsoft
Office Word" dialog that says

"Opening this document will run the following SQL command ... Data from your
database will be placed in the document. Do you want to continue?"

And it gives the options "Yes" or "No"

Since I will be performing this merge several times a day every day, I do
not want to have to respond to this dialog box each time. Is there a setting
that can be adjusted so that these documents open without performing this
check? Or maybe a way to set "Yes" as an automatic default, so that it does
not prompt me to respond?
 
J

Janfry

Look at "Application.DisplayAlerts", setting the value to wdAlertsNone.

Returns or sets the way certain alerts and messages are handled
while a macro is running.

WdAlertLevel can be one of these WdAlertLevel constants.
wdAlertsAll All message boxes and alerts are displayed; errors
are returned to the macro.
wdAlertsMessageBox Only message boxes are displayed; errors are
trapped and returned to the macro.
wdAlertsNone No alerts or message boxes are displayed. If a
macro encounters a message box, the default value is chosen and the macro
continues

Janfry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top