Hi ?B?bGhj?=,
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.
Is there a document open? If you use just ActiveDocument.Close (no parameters)
does that work?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)