Thread: Command Failure
View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
lhc lhc is offline
external usenet poster
 
Posts: 1
Default Command Failure

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.