會傳回指定的文件或檔案轉換程式的檔案格式。 唯讀的 Long。
語法
expression. SaveFormat
需要 expression。 一個代表「FileConverter」物件的變數。
註解
此特性會回傳一個唯一編號,指定外部檔案轉換器或 WdSaveFormat 常數。 使用 SaveAs2 方法中 FileFormat 參數的 SaveFormat 屬性值,將文件儲存為沒有對應 WdSaveFormat 常數的檔案格式。
範例
本範例會建立新的文件,然後將可用來儲存文件與其對應 SaveFormat 值的轉換程式列在表格中。
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
本範例會使用 WordPerfect 5.1 或 5.2 Secondary File 格式來儲存使用中文件。
ActiveDocument.SaveAs _
FileFormat:=FileConverters("WrdPrfctDat").SaveFormat
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。