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

This article was previously published under Q185143
This article has been archived. It is offered "as is" and will no longer be updated.
Visual Basic for Applications code is lost, when all of the followingconditions 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.
When you use the Undo command, the document is flagged as unmodified.Because the document is flagged as unmodified, the document is not savedwhen you use the Save command.
Save your document while the Visual Basic Editor is open. This will ensurethat your Visual Basic for Applications code is saved.
Microsoft has confirmed this to be a problem in the Microsoft productslisted at the beginning of this article.

Article ID: 185143 - Last Review: 10/07/2013 23:04:16 - Revision: 2.1

Microsoft Word 97 Standard Edition, Microsoft Word 98 for Macintosh

  • kbnosurvey kbarchive kbbug kbfix KB185143
ERROR: at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited) at System.Diagnostics.Process.Kill() at Microsoft.Support.SEOInfrastructureService.PhantomJS.PhantomJSRunner.WaitForExit(Process process, Int32 waitTime, StringBuilder dataBuilder, Boolean isTotalProcessTimeout)