Share via


Document.ExportAsFixedFormat 方法

使用 PDF 或 XPS 格式儲存文件。

命名空間:  Microsoft.Office.Tools.Word
組件:   Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)
  Microsoft.Office.Tools.Word (在 Microsoft.Office.Tools.Word.dll 中)

語法

'宣告
Sub ExportAsFixedFormat ( _
    OutputFileName As String, _
    ExportFormat As WdExportFormat, _
    OpenAfterExport As Boolean, _
    OptimizeFor As WdExportOptimizeFor, _
    Range As WdExportRange, _
    From As Integer, _
    To As Integer, _
    Item As WdExportItem, _
    IncludeDocProps As Boolean, _
    KeepIRM As Boolean, _
    CreateBookmarks As WdExportCreateBookmarks, _
    DocStructureTags As Boolean, _
    BitmapMissingFonts As Boolean, _
    UseISO19005_1 As Boolean, _
    ByRef FixedFormatExtClassPtr As Object _
)
void ExportAsFixedFormat(
    string OutputFileName,
    WdExportFormat ExportFormat,
    bool OpenAfterExport,
    WdExportOptimizeFor OptimizeFor,
    WdExportRange Range,
    int From,
    int To,
    WdExportItem Item,
    bool IncludeDocProps,
    bool KeepIRM,
    WdExportCreateBookmarks CreateBookmarks,
    bool DocStructureTags,
    bool BitmapMissingFonts,
    bool UseISO19005_1,
    ref Object FixedFormatExtClassPtr
)

參數

  • OutputFileName
    型別:System.String
    新的 PDF 或 XPS 檔案的路徑和檔案名稱。
  • OpenAfterExport
    型別:System.Boolean
    true 表示要自動開啟新檔案,否則為 false。
  • IncludeDocProps
    型別:System.Boolean
    true 表示要在新檔案中包含文件摘要資訊,否則為 false。
  • KeepIRM
    型別:System.Boolean
    true 表示要將資訊版權管理 (IRM) 權限複製到 XPS 文件 (如果來源文件有 IRM 保護的話),否則為 false。預設值為 true。
  • DocStructureTags
    型別:System.Boolean
    true 表示要包含額外資料 (例如,內容之流程和邏輯組織的相關資訊) 以協助螢幕助讀員,否則為 false。預設值為 true。
  • BitmapMissingFonts
    型別:System.Boolean
    true 表示要包含文字的點陣圖;false 表示要參考文字字型。當字型授權不允許將字型嵌入 PDF 檔案時,請將這個參數設定為 true。如果您將這個參數設定為 false,且指定的字型無法使用,則檢閱者的電腦會以適當的字型來替代。預設值為 true。
  • UseISO19005_1
    型別:System.Boolean
    true 表示限制 PDF 使用依循 ISO 19005-1 標準化的 PDF 子集,否則為 false。如果您將這個參數設定為 true,則產生的檔案會更確實地獨立 (Self-Contained),但由於格式的限制,可能變得較大或出現更多視覺疊影。預設值為 false。
  • FixedFormatExtClassPtr
    型別:System.Object%
    IMsoDocExporter 介面的實作之指標,能夠以不同的固定格式儲存文件。如需詳細資訊,請參閱<擴充 Office (2007) 固定格式匯出功能>。

備註

您可以在 Microsoft Office Word 中另存為 PDF 或 XPS 檔案,但必須先安裝提供這個功能的增益集 (Add-In)。 如需詳細資訊,請搜尋 Office Online 上的「啟用其他檔案格式的支援,例如 PDF 和 XPS」。

選擇性參數

如需選擇性參數的詳細資訊,請參閱Office 方案中的選擇性參數

.NET Framework 安全性

請參閱

參考

Document 介面

Microsoft.Office.Tools.Word 命名空間