WD2000: VBA Code Lost When Converting to Another File Format

ID: Q212387


The information in this article applies to:


SYMPTOMS

When you save a Word document that contains Visual Basic for Applications code in another document format, such as Rich-Text Format (RTF), the Visual Basic for Applications code is lost.

When you try to save in another file format, the following warning appears:

All macros in this document will be lost if the document is saved
in "Selected Document Format";. Do you want to save in this
format anyway?


CAUSE

None of the converters that ship with Word supports the retention of Visual Basic for Applications code. If you need to save a document that contains code (macros) in a format other than Word 97 or Word 2000, make sure you have a backup copy of the document before you convert it.


STATUS

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


MORE INFORMATION

NOTE: When troubleshooting corrupt documents, support professionals should convert a copy of the problem document to RTF, rather than the original, to prevent code loss. It is possible that the Organizer may be able to recover code from a corrupt document after the text of a document is recovered using other methods.


REFERENCES

For more information about getting help with Microsoft Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

Q163435 VBA: Programming Resources for Visual Basic for Applications

Additional query words: conversion converting textconv translation translating translated converted converts translates vb vba vbe script coding programming rich text lost missing gone disappears disappeared empty


Keywords          : kberrmsg kbother kbdta kbconversion kbdtacode wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 13, 1999