FROM
Word uses a slightly different version of the same property. Instead
of accepting a Boolean value, Word uses three Long constants: wdAlertsNone,
wdAlertsAll and wdAlertsMessageBox. The first two settings are
fairly self-explanatory. The last setting tells Word to display
only standard message box alerts.
Under normal conditions, the code statement:
ActiveDocument.Close
would generate a message box asking if you wanted to save the document
in question. Using the DisplayAlerts property, the following code
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.Close
Application.DisplayAlerts = wdAlertsAll
would immediately open the SaveAs dialog box without the initial
prompt.
swtrader
-- If you don't know where you're going, you'll always know when you're not there.