Export (0) Print
Expand All
Expand Minimize

Range.ExportAsFixedFormat method

Saves a portion of a document as PDF or XPS format.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

void ExportAsFixedFormat(
	string OutputFileName,
	WdExportFormat ExportFormat,
	bool OpenAfterExport,
	WdExportOptimizeFor OptimizeFor,
	bool ExportCurrentPage,
	WdExportItem Item,
	bool IncludeDocProps,
	bool KeepIRM,
	WdExportCreateBookmarks CreateBookmarks,
	bool DocStructureTags,
	bool BitmapMissingFonts,
	bool UseISO19005_1,
	ref Object FixedFormatExtClassPtr


Type: System.String

Required String The path and file name of the new PDF or XPS file.

Type: Microsoft.Office.Interop.Word.WdExportFormat

Required WdExportFormat Specifies either PDF or XPS format.

Type: System.Boolean

Optional Boolean Opens the new file after exporting the contents.

Type: Microsoft.Office.Interop.Word.WdExportOptimizeFor

Optional WdExportOptimizeFor Specifies whether to optimize for screen or print.

Type: System.Boolean

Optional Boolean Specifies whether to export the current page. True exports the entire page. False exports only the current selection.

Type: Microsoft.Office.Interop.Word.WdExportItem

Optional WdExportItem Specifies whether the export process includes text only or includes text with markup.

Type: System.Boolean

Optional Boolean Specifies whether to include document properties in the newly exported file.

Type: System.Boolean

Optional Boolean Specifies whether to copy IRM permissions to an XPS document if the source document has IRM protections. Default value is True.

Type: Microsoft.Office.Interop.Word.WdExportCreateBookmarks

Optional WdExportCreateBookmarks Specifies whether to export bookmarks and the type of bookmarks to export.

Type: System.Boolean

Optional Boolean Specifies whether to include extra data to help screen readers, for example information about the flow and logical organization of the content. Default value is True.

Type: System.Boolean

Optional Boolean Specifies whether to include a bitmap of the text. Set this parameter to True when font licenses do not permit a font to be embedded in the PDF file. If False, the font is referenced, and the viewer's computer substitutes an appropriate font if the authored one is not available. Default value is True.

Type: System.Boolean

Optional Boolean 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. Default value is False.

Type: System.Object

Optional Object Specifies a pointer to an add-in that allows calls to an alternate implementation of code. 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. For more information, see "Extending the Office (2007) Fixed-Format Export Feature" on MSDN.

You can save as a PDF or XPS file from a 2007 Microsoft Office system program only after you install an add-in. Microsoft Download Center.

© 2015 Microsoft