SaveFormat Property
Applies To
Document object, FileConverter object.
Description
Returns the file format of the specified document or file converter. Can be a unique number that specifies an external file converter, or one of the following WdSaveFormat constants: wdFormatDocument, wdFormatDOSText, wdFormatDOSTextLineBreaks, wdFormatRTF, wdFormatTemplate, wdFormatText, wdFormatTextLineBreaks, or wdFormatUnicodeText. Read-only Long.
See Also
CanSave property, DefaultSaveFormat property, Extensions property, FileConverters property, FormatName property.
Example
If the active document is a Rich Text Format (RTF) document, this example saves it as a Word document.
If ActiveDocument.SaveFormat = wdFormatRTF Then
ActiveDocument.SaveAs FileFormat:=wdFormatDocument
End If
This example displays the converters that can be used to save documents. The message box displays the unique save format value and the format name.
For Each fc In FileConverters
If fc.CanSave = True Then MsgBox fc.SaveFormat & vbCr & fc.FormatName
Next fc
This example saves the active document in the WordPerfect 5.1 or 5.2 secondary file format.
ActiveDocument.SaveAs FileFormat:=FileConverters("WrdPrfctDat").SaveFormat