Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 1.96 KB

Word.FileConverter.SaveFormat.md

File metadata and controls

79 lines (51 loc) · 1.96 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
FileConverter.SaveFormat property (Word)
vbawd10.chm161021954
vbawd10.chm161021954
Word.FileConverter.SaveFormat
d837cd22-38eb-5160-1f85-16001448213e
06/08/2017
medium

FileConverter.SaveFormat property (Word)

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

Syntax

expression. SaveFormat

expression Required. A variable that represents a 'FileConverter' object.

Remarks

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.

Example

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

See also

FileConverter Object

[!includeSupport and feedback]