Export (0) Print
Expand All

Document.ExportAsFixedFormat Method

Office 2007
Saves a Microsoft Office 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.

Version Information
 Version Added:  Publisher 2007

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

NameRequired/OptionalData TypeDescription
FormatRequiredPbFixedFormatTypeThe format in which you want to export the publication. See Remarks for possible values.
FilenameRequiredStringThe file name for the exported file.
IntentOptionalPbFixedFormatIntentThe output quality of the exported file. See Remarks for possible values.
IncludeDocumentPropertiesOptionalBooleanTrue if you want to save the document properties with the PDF file.
ColorDownsampleTargetOptionalLongThe target for down-sampling of colored images. Measured in dots per inch. Must be greater than 96
ColorDownsampleThresholdOptionalLongThe threshold at or above which an image is down-sampled to the ColorDownsample target level.
OneBitDownsampleTargetOptionalLongThe target for down-sampling of one-bit images.
OneBitDownsampleThresholdOptionalLongThe threshold at or above which an image is down-sampled to the OneBitDownsample target level.
FromOptionalLongThe page number of the first page to export.
ToOptionalLongThe page number of the last page to export.
CopiesOptionalLongThe number of copies.
CollateOptionalBooleanWhether to collate the copies.
PrintStyleOptionalPbPrintStyleThe style in which to print the exported file. See Remarks for possible values.
DocStructureTagsOptionalBooleanWhether to include document structure tags to improve document accessibility. The default is True.
BitmapMissingFontsOptionalBooleanWhether to include a bitmap of the text. Pass True for this parameter when font licenses do not 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_1OptionalBooleanWhether the resulting document is compliant with ISO 19005-1 (PDF/A). The default is False.
ExternalExporterOptionalVariantA 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 "Extending the Office (2007) Fixed-Format Export Feature" on MSDN.

Remarks

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

Aa438316.vs_note(en-us,office.12).gif  Note
You can save as a PDF or XPS file from a Microsoft Office 2007 program only after you install an add-in. For more information, search for "Enable support for other file formats, such as PDF and XPS" on Office Online.

Possible values for the Format parameter are shown in the following table and declared in PbFixedFormatType in the Publisher type library.

ConstantValueDescription

pbFixedFormatTypePDF

2

PDF format

pbFixedFormatTypeXPS

1

XPS format

Possible values for the Intent parameter are shown in the following table and declared in PbFixedFormatIntent in the Publisher type library.

ConstantValueDescription

pbIntentMinimum

1

Squeeze the publication to the smallest file size. This satisfies the on-screen viewing scenario where the publication is viewed on a computer monitor.

pbIntentStandard

2

Distribute the publication as an e-mail message or from a Web site. Note that the user does not know how the publication will be viewed: on-screen or printed from a desktop printer. Both the desktop printing scenario and the on-screen viewing scenario must be met by this intent.

pbIntentPrinting

3

Print the publication on a desktop printer or at a copy store.

pbIntentCommercial

4

Submit the publication to a commercial press.

Possible values for the PrintStyle parameter are declared in the PbPrintStyle enumeration in the Publisher type library. The default value depends on the value of the Intent parameter.

Example

The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the ExportAsFixedFormat method to save the 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.

Visual Basic for Applications
Public Sub ExportAsFixedFormat_Example()

    ThisDocument.ExportAsFixedFormat pbFixedFormatTypePDF, "pathandfilename.pdf"

End Sub



Community Additions

ADD
Show:
© 2015 Microsoft