WD: VBA Code Not Saved After You Use the Undo Command

ID: Q185143


The information in this article applies to:
  • Microsoft Word 97 for Windows
  • Microsoft Word 98 Macintosh Edition


SYMPTOMS

Visual Basic for Applications code is lost, when all of the following conditions are true:

  • You open the document and make a change.


  • -and-

  • You go into the Visual Basic Editor and insert code in a module stored in that document.


  • -and-

  • You undo the changes you made in the document.



CAUSE

When you use the Undo command, the document is flagged as unmodified. Because the document is flagged as unmodified, the document is not saved when you use the Save command.


WORKAROUND

Save your document while the Visual Basic Editor is open. This will ensure that your Visual Basic for Applications code is saved.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbdta macword98
Version : :; MACINTOSH:98
Platform : MACINTOSH
Issue type : kbbug


Last Reviewed: January 3, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.