ConverterLookup()

Syntax

ConverterLookup(FormatName$)

Remarks

Returns a number corresponding to the file format specified by FormatName$. You can use this number with the .Format argument in a FileSaveAs instruction to save a file in a different format. If the specified format does not exist, ConverterLookup() returns –1.

Argument

Explanation

FormatName$

The class name for the format as returned by Converter$(), or the name of a file format as it appears in the Save File As Type box in the Save As dialog box (File menu).


Examples

This Windows example saves the active document in rich-text format (RTF), using the class name "MSRTF" to specify the format:


FileSaveAs .Name = "C:\RTF\TEST.RTF", \
        .Format = ConverterLookup("MSRTF")

The following Macintosh example also saves the active document in RTF, but specifies the format using the name in the Save File As Type box in the Save As dialog box instead of the class name:


FileSaveAs .Name = "HD:RTF:RTF TEST", \
        .Format = ConverterLookup("Rich Text Format")

See Also

Converter$(), FileSaveAs