FileConverter.SaveFormat Property (Word)

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

expression .SaveFormat

expression Required. A variable that represents a FileConverter object.

This property returns 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 SaveAs2 method to save a document in a file format for which there isn't a corresponding WdSaveFormat constant.

This example creates a new document and lists in a table the converters that can be used to save documents and their corresponding SaveFormat values.

Sub FileConverterList() 
 Dim cnvFile As FileConverter 
 Dim docNew As Document 
 
 'Create a new document and set a tab stop 
 Set docNew = Documents.Add 
 docNew.Paragraphs.Format.TabStops.Add _ 
 Position:=InchesToPoints(3) 
 
 'List all the converters in the FileConverters collection 
 With docNew.Content 
 .InsertAfter "Name" & vbTab & "Number" 
 .InsertParagraphAfter 
 For Each cnvFile In FileConverters 
 If cnvFile.CanSave = True Then 
 .InsertAfter cnvFile.FormatName & vbTab & _ 
 cnvFile.SaveFormat 
 .InsertParagraphAfter 
 End If 
 Next 
 .ConvertToTable 
 End With 
 
End Sub

This example saves the active document in the WordPerfect 5.1 or 5.2 secondary file format.

ActiveDocument.SaveAs _ 
 FileFormat:=FileConverters("WrdPrfctDat").SaveFormat
Show:
© 2015 Microsoft