Document.ExportAsFixedFormat method (Publisher)

Saves a Microsoft Publisher publication in PDF or XPS format. The conversion readies the document to be sent to commercial presses, to copy shops, for desktop printing, or for electronic distribution.

Syntax

expression.ExportAsFixedFormat (Format, FileName, Intent, IncludeDocumentProperties, ColorDownsampleTarget, ColorDownsampleThreshold, OneBitDownsampleTarget, OneBitDownsampleThreshold, From, To, Copies, Collate, PrintStyle, DocStructureTags, BitmapMissingFonts, UseISO19005_1, ExternalExporter)

expression A variable that represents a Document object.

Parameters

Name Required/Optional Data type Description
Format Required PbFixedFormatType The format in which you want to export the publication. Can be one of the PbFixedFormatType constants.
FileName Required String The file name for the exported file.
Intent Optional PbFixedFormatIntent The output quality of the exported file. Can be one of the PbFixedFormatIntent constants.
IncludeDocumentProperties Optional Boolean True if you want to save the document properties with the PDF file.
ColorDownsampleTarget Optional Long The target for down-sampling of colored images. Measured in dots per inch. Must be greater than 96.
ColorDownsampleThreshold Optional Long The threshold at or above which an image is down-sampled to the ColorDownsampleTarget level.
OneBitDownsampleTarget Optional Long The target for down-sampling of one-bit images.
OneBitDownsampleThreshold Optional Long The threshold at or above which an image is down-sampled to the OneBitDownsampleTarget level.
From Optional Long The page number of the first page to export.
To Optional Long The page number of the last page to export.
Copies Optional Long The number of copies.
Collate Optional Boolean Whether to collate the copies.
PrintStyle Optional PbPrintStyle The style in which to print the exported file. Can be one of the PbPrintStyle constants. The default value depends on the value of the Intent parameter.
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. Pass True for this parameter when font licenses don't permit a font to be embedded in the PDF file. If you pass 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.
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 add-in that allows calls to an alternate implementation of code. You can add support for additional fixed formats by writing a Microsoft Office add-in that implements the IMsoDocExporter COM interface. For more information, see Extend the fixed-format export feature in Word Automation Services.

Remarks

The ExportAsFixedFormat method is the equivalent of the Publish As PDF or XPS command on the File menu in the Publisher user interface.

Example

The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the ExportAsFixedFormat method to save the active publication as a .pdf file.

Before running this code, replace pathandfilename.pdf with a valid file name and the path to a folder on your computer where you have permission to save files.

Public Sub ExportAsFixedFormat_Example() 
 
 ThisDocument.ExportAsFixedFormat pbFixedFormatTypePDF, "pathandfilename.pdf" 
 
End Sub

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.