This documentation is archived and is not being maintained.

Document.SaveFormat Property

Office 2007
Returns the file format of the specified document or file converter. Read-only Long.



expression   Required. A variable that represents a Document object.


The SaveFormat property will be a unique number that specifies an external file converter or a WdSaveFormat constant.

Use the value of the SaveFormat property for the FileFormat argument of the SaveAs method to save a document in a file format for which there isn't a corresponding WdSaveFormat constant.


If the active document is a Rich Text Format (RTF) document, this example saves it as a Microsoft Word document.

Visual Basic for Applications
If ActiveDocument.SaveFormat = wdFormatRTF Then
    ActiveDocument.SaveAs FileFormat:=wdFormatDocument
End If