R
reitanospa1
Does anyone know why this would fail
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.Close
Application.DisplayAlerts = wdAlertsAll
Most of my experience is in Excel VBA, but it seems like this should
work. What I get is a Save As... dialog and an error that says
"Run-time error '4198': Command failed" when I click the Cancel button.
I'm trying to avoid the dialog box with the dispalyalerts = none, but
it keeps popping up anyway.
When I choose Debug from the error dialog it appears to be hung up on
the .close line.
Is there an alternate way to close a document without being prompted to
save?
Thanks
Application.DisplayAlerts = wdAlertsNone
ActiveDocument.Close
Application.DisplayAlerts = wdAlertsAll
Most of my experience is in Excel VBA, but it seems like this should
work. What I get is a Save As... dialog and an error that says
"Run-time error '4198': Command failed" when I click the Cancel button.
I'm trying to avoid the dialog box with the dispalyalerts = none, but
it keeps popping up anyway.
When I choose Debug from the error dialog it appears to be hung up on
the .close line.
Is there an alternate way to close a document without being prompted to
save?
Thanks