#1
|
|||
|
|||
Using a display alert command in Word
Hi, Code:
Sub Display() Application.DisplayAlerts = wdAlertsNone End Sub Using it on my drive has no problems. |
#2
|
||||
|
||||
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] |
#3
|
||||
|
||||
There's a macro process at http://www.gmayor.com/word_vba_examples.htm which will toggle the SQL message suppression setting in the registry.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to run command in word | si14 | Word | 3 | 06-10-2015 04:08 PM |
How to dismiss/avoid warning/alert dialog boxes in Microsoft.Office.Interop.Word.Document | meenagrace | Word VBA | 3 | 11-07-2014 01:29 PM |
From the command line, how do I run a Word macro? | jdockstader | Word | 7 | 02-04-2013 06:09 AM |
Word VBA: How to create a command button and trigger a function? | tinfanide | Word VBA | 2 | 12-02-2011 05:51 AM |
Invoking a command line from inside Word | bolpom | Word | 1 | 03-16-2011 03:03 AM |