Article ID: 209186 - Last Review: October 11, 2006 - Revision: 3.2 WD2000: How to Use Other Converters with the FileFormat PropertyThis article was previously published under Q209186 On This PageSUMMARY
The SaveAs method of the Document object in Microsoft Visual Basic for Applications has an optional parameter called FileFormat that you can use to specify the save format for the document.
This article describes how to use the FileFormat property of the SaveAs method to specify a converter that is not supported with one of the supplied constants (values). MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base: 212536
(http://support.microsoft.com/kb/212536/EN-US/
)
OFF2000: How to Run Sample Code from Knowledge Base Articles
The FileFormat optional variant (argument) specifies the format in which the document is to be saved and can be one of the following native (built-in) wdSaveFormat constants.
Other File TypesIf you record a macro that saves a file as a type that is not supported by one of the constants described earlier, the FileFormat property will contain a number. The following sample macro was recorded by using RFT-DCA as the Save As Type:To retrieve the correct FileFormat number for a conversion type for any computer, use the FileConverters collection. The following sample Visual Basic for Applications macro saves a document in RTF-DCA format on any computer. NOTE: In the following sample, replace "RFTDCA" with the class name that you want to Save As. For a list of class names, see the "How to Obtain Class Names" section later in this article. How to Obtain Class NamesThe following list contains converters and class names that are installed by Word and that you can use for saving a document.
To retrieve other class names for an installed converter to Save As, you can loop through the FileConverters collection. The following sample macro loops through all installed converters that you can use for saving, and then it inserts the converter name and associated class name into a blank document: REFERENCESFor additional information about the text converters included with the Microsoft Office 2000 Setup or the Microsoft Office Converter Pack, click the article number below
to view the article in the Microsoft Knowledge Base:
235928
(http://support.microsoft.com/kb/235928/EN-US/
)
WD2000: Supported File and Graphics Formats
For additional information about getting help with Visual Basic for Applications, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
212623
(http://support.microsoft.com/kb/212623/EN-US/
)
WD2000: Macro Programming Resources
226118
(http://support.microsoft.com/kb/226118/EN-US/
)
OFF2000: Programming Resources for Visual Basic for Applications
| Article Translations
|
Back to the top
