L
Larry
Lately in my Word 97 I've been having a problem with a macro which is a
customized version of DocClose in which I do some other steps in
addition to closing the document. The code used to close the document
is
WordBasic.DocClose
I've also used ActiveDocument.Close for this.
Here's what happens. When I run this customized DocClose macro using
Ctrl+W, if the active document is an unsaved document with changes, I
get the SaveAs dialog box instead of the message saying, "Do you want to
save the changes you made to Document2? If the active document is a
saved document with unsaved changes, running the DocClose macro
automatically saves the changes and closes the document!
If I comment out all the other code in the macro, leaving only
WordBasic.DocClose or ActiveDocument.Close, the problem persists. So
the problem is definitely in those two commands.
The only way I can fix the problem is to rename the DocClose macro as
something else so that Ctrl+W. is running the built-in DocClose command
again.
I've had this macro for a long time and it never gave me trouble before.
Using WordBasic.Close always worked exactly like using the built-in
DocClose command.
Also, I re-merged the Word Data key in the Registry, but that didn't
help.
Any ideas?
Thanks,
Larry
customized version of DocClose in which I do some other steps in
addition to closing the document. The code used to close the document
is
WordBasic.DocClose
I've also used ActiveDocument.Close for this.
Here's what happens. When I run this customized DocClose macro using
Ctrl+W, if the active document is an unsaved document with changes, I
get the SaveAs dialog box instead of the message saying, "Do you want to
save the changes you made to Document2? If the active document is a
saved document with unsaved changes, running the DocClose macro
automatically saves the changes and closes the document!
If I comment out all the other code in the macro, leaving only
WordBasic.DocClose or ActiveDocument.Close, the problem persists. So
the problem is definitely in those two commands.
The only way I can fix the problem is to rename the DocClose macro as
something else so that Ctrl+W. is running the built-in DocClose command
again.
I've had this macro for a long time and it never gave me trouble before.
Using WordBasic.Close always worked exactly like using the built-in
DocClose command.
Also, I re-merged the Word Data key in the Registry, but that didn't
help.
Any ideas?
Thanks,
Larry