L
lhc
I receive a message "Command Failure" each time I attemp to use the following
code to close a document:
On Error GoTo errorHandler
ActiveDocument.Close _
SaveChanges:=wdPromptToSaveChanges, _
OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"
The code without the error handler under debug gives a "Command Failure"
message.
code to close a document:
On Error GoTo errorHandler
ActiveDocument.Close _
SaveChanges:=wdPromptToSaveChanges, _
OriginalFormat:=wdPromptUser
errorHandler:
If Err = 4198 Then MsgBox "Document was not closed"
The code without the error handler under debug gives a "Command Failure"
message.