WD2000: DocClose/FileClose Macros Fail to Work As ExpectedID: Q220505
|
When you create or convert a macro that uses one of the following Word built-in command names for the macro name
FileClosethe macro fails to run as expected when you close a document using the Close button in the upper right corner of the document window.
DocClose
To work around this problem, you can use the Visual Basic for Applications Document Close event.
To create a Document Close event procedure, do the following:
Project(MyDoc)
Private Sub Document_Close
' < Type your commands here >
End Sub
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
For more information about the Document Close event, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "Close event" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic.
Additional query words: vba
Keywords : kbdta wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: June 15, 1999