Presentation.ExportAsFixedFormat method (PowerPoint)

Publishes a copy of a Microsoft PowerPoint presentation as a file in a fixed format, either PDF or XPS.

Syntax

expression.ExportAsFixedFormat (Path, FixedFormatType, Intent, FrameSlides, HandoutOrder, OutputType, PrintHiddenSlides, PrintRange, RangeType, SlideShowName, IncludeDocProperties, KeepIRMSettings, DocStructureTags, BitmapMissingFonts, UseISO19005_1, ExternalExporter)

expression An expression that returns a Presentation object.

Parameters

Name Required/Optional Data type Description
Path Required String The path for the export.
FixedFormatType Required PpFixedFormatType The format to which the slides should be exported.
Intent Optional PpFixedFormatIntent The purpose of the export.
FrameSlides Optional MsoTriState Whether the slides to be exported should be bordered by a frame.
HandoutOrder Optional PpPrintHandoutOrder The order in which the handout should be printed.
OutputType Optional PpPrintOutputType The type of output.
PrintHiddenSlides Optional MsoTriState Whether to print hidden slides.
PrintRange Optional PrintRange The slide range.
RangeType Optional PpPrintRangeType The type of slide range.
SlideShowName Optional String The name of the slide show.
IncludeDocProperties Optional Boolean Whether the document properties should also be exported. The default is False.
KeepIRMSettings Optional Boolean Whether the IRM settings should also be exported.

If FixedFormatType is PpFixedFormatTypePDF, this flag determines if labels and IRM settings should be exported.

The default is True.
DocStructureTags Optional Boolean Whether to include document structure tags to improve document accessibility. The default is True.
BitmapMissingFonts Optional Boolean Whether to include a bitmap of the text. The default is True.
UseISO19005_1 Optional Boolean Whether the resulting document is compliant with ISO 19005-1 (PDF/A). The default is False.
ExternalExporter Optional Variant A pointer to an Office add-in that implements the IMsoDocExporter COM interface and allows calls to an alternate implementation of code. The default is a null pointer.

Remarks

The ExportAsFixedFormat method is the equivalent of the Save As PDF or XPS command on the Office menu in the PowerPoint user interface. The method creates a file that contains a static view of the active presentation.

The FixedFormatType parameter value can be one of these PpFixedFormatType constants.

Constant Value Description
ppFixedFormatTypePDF 2 Export to PDF format.
ppFixedFormatTypeXPS 1 Export to XPS format.

The Intent parameter value can be one of these PpFixedFormatIntent constants.

Constant Description
ppFixedFormatIntentPrint Intended to be published online and printed.
ppFixedFormatIntentScreen The default. Intended to be published only online.

The FrameSlides parameter value can be one of these MsoTriState constants.

Constant Description
msoFalse The default. Does not frame exported slides.
msoTrue Frames exported slides.

The HandoutOrder parameter value can be one of these PpPrintHandoutOrder constants.

Constant Description
ppPrintHandoutHorizontalFirst Prints handouts with consecutive slides displayed horizontally first (in horizontal rows).
ppPrintHandoutVerticalFirst The default. Prints handouts with consecutive slides displayed vertically first (in vertical columns).

The OutputType parameter value can be a combination of one or more of these PpPrintOutputType constants.

Constant Description
ppPrintOutputBuildSlides
ppPrintOutputFourSlideHandouts Prints four slides per handout page.
ppPrintOutputNineSlideHandouts Prints nine slides per handout page.
ppPrintOutputNotesPages Prints notes pages.
ppPrintOutputOneSlideHandouts Prints one slide per handout page.
ppPrintOutputOutline Prints outline view.
ppPrintOutputSixSlideHandouts Prints six slides per handout page.
ppPrintOutputSlides Prints all slides in the presentation. The default.
ppPrintOutputThreeSlideHandouts Prints three slides per handout page.
ppPrintOutputTwoSlideHandouts Prints two slides per handout page.

The PrintHiddenSlides parameter value can be one of these MsoTriState constants.

Constant Description
msoFalse The default. Does not print hidden slides.
msoTrue Prints hidden slides.

The RangeType parameter value can be one of these PpPrintRangeType constants.

Constant Description
ppPrintAll The default. Exports all slides.
ppPrintCurrent Exports only the current slide.
ppPrintNamedSlideShow Exports the named (custom) slide show specified in SlideShowName.
ppPrintSelection Exports selected slides.
ppPrintSlideRange Exports the specified slide range.

Set BitmapMissingFonts to True when font licensing does not permit you to embed a font in the PDF file. If you set this parameter to False, the font is referenced, and the viewer's computer substitutes an appropriate font if the authored one is not available.

The KeepIRMSettings parameter behaves specially for PDF. It controls the retention of both labels and encryption to the output file. For more information, see Manage sensitivity labels in Office apps.

If the presentation is not fully downloaded, this method fails and an error occurs. For more information about the Partial Documents, see Work with Partial Documents.

Example

The following example shows how to use the ExportAsFixedFormat method to export the active presentation as a .pdf file named test.pdf to the user's Documents folder.

Public Sub ExportAsFixedFormat_Example() 
 
       ActivePresentation.ExportAsFixedFormat "C:\Users\username \Documents\test.pdf", ppFixedFormatTypePDF, ppFixedFormatIntentScreen, msoCTrue, ppPrintHandoutHorizontalFirst, ppPrintOutputBuildSlides, msoFalse, , , , False, False, False, False, False 
 
End Sub

See also

Manage sensitivity labels in Office apps

Work with Partial Documents

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.