ExportAsFixedFormat2 方法 (Word)Selection.ExportAsFixedFormat2 method (Word)

将当前所选内容保存为 PDF 或 XPS 格式。Saves the current selection as PDF or XPS format.


表达式ExportAsFixedFormat2(OutputFileNamemicrosoft.office.infopath.exportformatOpenAfterExportOptimizeForExportCurrentPageItemIncludeDocPropsKeepIRMCreateBookmarksDocStructureTagsBitmapMissingFontsUseISO19005_1OptimizeForImageQualityFixedFormatExtClassPtr)expression.ExportAsFixedFormat2 (OutputFileName, ExportFormat, OpenAfterExport, OptimizeFor, ExportCurrentPage, Item, IncludeDocProps, KeepIRM, CreateBookmarks, DocStructureTags, BitmapMissingFonts, UseISO19005_1, OptimizeForImageQuality, FixedFormatExtClassPtr)

_表达式_一个返回**Selection** 对象的表达式。expression An expression that returns a Selection object.


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
OutputFileNameOutputFileName 必需Required StringString 新的 PDF 或 XPS 文件的路径和文件名。The path and file name of the new PDF or XPS file.
ExportFormatExportFormat 必需Required WdExportFormatWdExportFormat 指定采用 PDF 格式或 XPS 格式。Specifies either PDF or XPS format.
OpenAfterExportOpenAfterExport 可选Optional BooleanBoolean 导出内容后打开新文件。Opens the new file after exporting the contents.
OptimizeForOptimizeFor 可选Optional WdExportOptimizeForWdExportOptimizeFor 指定是针对屏幕显示还是打印进行优化。Specifies whether to optimize for screen or print.
ExportCurrentPageExportCurrentPage 可选Optional BooleanBoolean 指定是否导出当前页。Specifies whether to export the current page. True 将导出整个页面。True exports the entire page. False 将导出当前的选择。False exports only the current selection.
ItemItem 可选Optional WdExportItemWdExportItem 指定导出过程是只包括文本还是包括文本和标记。Specifies whether the export process includes text only or includes text with markup.
IncludeDocPropsIncludeDocProps 可选Optional BooleanBoolean 指定在最新导出的文件中是否包括文档属性。Specifies whether to include document properties in the newly exported file.
KeepIRMKeepIRM 可选Optional BooleanBoolean 指定是否将 IRM 权限复制到 XPS 文档,如果在源文档具有 IRM 保护。Specifies whether to copy IRM permissions to an XPS document if the source document has IRM protections. 默认值为 TrueDefault value is True.
CreateBookmarksCreateBookmarks 可选Optional WdExportCreateBookmarksWdExportCreateBookmarks 指定是否导出书签和要导出的书签的类型。Specifies whether to export bookmarks and the type of bookmarks to export.
DocStructureTagsDocStructureTags 可选Optional BooleanBoolean 指定是否包含额外数据来帮助屏幕阅读器,例如有关的流和逻辑组织的内容的信息。Specifies whether to include extra data to help screen readers, for example information about the flow and logical organization of the content. 默认值为 TrueDefault value is True.
BitmapMissingFontsBitmapMissingFonts 可选Optional BooleanBoolean 指定是否包含文本的位图。Specifies whether to include a bitmap of the text. 当字体许可不允许在 PDF 文件中嵌入某一字体时,请将此参数设置为 TrueSet this parameter to True when font licenses do not permit a font to be embedded in the PDF file. 如果 False ,则引用该字体,和查看者的计算机会替换合适的字体,如果编写的一个不可用。If False, the font is referenced, and the viewer's computer substitutes an appropriate font if the authored one is not available. 默认值为 TrueDefault value is True.
UseISO19005_1UseISO19005_1 可选Optional BooleanBoolean 指定是否限制对 PDF 子集的 PDF 使用按照 ISO 标准化 19005-1。Specifies whether to limit PDF usage to the PDF subset standardized as ISO 19005-1. 如果 ,所产生的文件会更加可靠地自我包含,但可能会更大或显示更多的视觉瑕疵,由于受到格式的限制。If True, the resulting files are more reliably self-contained but may be larger or show more visual artifacts due to the restrictions of the format. 默认值为 FalseDefault value is False.
OptimizeForImageQualityOptimizeForImageQuality 可选Optional BooleanBoolean 指定是否对图像进行缩减采样或保持其原始质量。Specifies whether to downsample images or keep their original quality. 如果为 True, 则生成的文件将具有更好的图像质量, 但可能更大。If True, the resulting files will have better image quality but may be larger. 默认值为 FalseDefault value is False.
FixedFormatExtClassPtrFixedFormatExtClassPtr OptionalOptional VariantVariant 指定一个指针以指向一个允许对代码的备用实现进行调用的加载项。Specifies a pointer to an add-in that allows calls to an alternate implementation of code. 代码的备用实现将对应用程序生成的 EMF 和 EMF+ 页面描述进行解释,以生成其自身的 PDF 或 XPS。The alternate implementation of code interprets the EMF and EMF+ page descriptions that are generated by the applications to make their own PDF or XPS. 有关详细信息, 请参阅在 Word Automation Services 中扩展固定格式的导出功能For more information, see Extend the fixed-format export feature in Word Automation Services.


只有在安装外接程序后,才能在 Microsoft Office system 程序中另存为 PDF 或 XPS 文件。You can save as a PDF or XPS file from a Microsoft Office system program only after you install an add-in. 有关详细信息, 请参阅保存或转换为 PDF 或 XPSFor more information, see Save or convert to PDF or XPS.

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.