Table of contents
TOC
Collapse the table of content
Expand the table of content

Document.ExportAsFixedFormat Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Exports a Microsoft Visio document as a file in a fixed format, either PDF or XPS.

Syntax

expression . ExportAsFixedFormat( FixedFormat , OutputFileName , Intent , PrintRange , FromPage , ToPage , ColorAsBlack , IncludeBackground , IncludeDocumentProperties , IncludeStructureTags , UseISO19005_1 , FixedFormatExtClass )

expression An expression that returns a Document object.

Parameters

NameRequired/OptionalData TypeDescription
FixedFormatRequiredVisFixedFormatTypesThe format type in which to export the document. See Remarks for possible values.
OutputFileNameOptionalStringThe name and path of the file to which to output, enclosed in quotation marks.
IntentRequiredVisDocExIntentThe output quality. See Remarks for possible values.
PrintRangeRequiredVisPrintOutRangeThe range of document pages to be exported. See Remarks for possible values.
FromPageOptionalLongIf PrintRange is visPrintFromTo , the first page in the range to be exported. The default is 1, which indicates the first page of the drawing.
ToPageOptionalLongIf PrintRange is visPrintFromTo , the last page in the range to be exported. The default is -1, which indicates the last page of the drawing.
ColorAsBlackOptionalBooleanTrue to render all colors as black to ensure that all shapes are visible in the exported drawing. False to render colors normally. The default is False .
IncludeBackgroundOptionalBooleanWhether to include background pages in the exported file. The default is True .
IncludeDocumentPropertiesOptionalBooleanWhether to include document properties in the exported file. The default is True .
IncludeStructureTagsOptionalBooleanWhether to include document structure tags to improve document accessibility. The default is True .
UseISO19005_1OptionalBooleanWhether the resulting document is compliant with ISO 19005-1 (PDF/A). The default is False .
FixedFormatExtClassOptional[UNKNOWN]A pointer to a class that implements the IMsoDocExporter interface for purposes of creating custom fixed output. The default is a null pointer.

Return Value

Nothing

Remarks

The ExportAsFixedFormat method creates a file that contains a static view of the Visio document.

Possible values for the FixedFormat parameter are shown in the following table and declared in VisFixedFormatTypes in the Visio type library.

ConstantValueDescription
visFixedFormatPDF1PDF fixed format
visFixedFormatXPS2XPS fixed format

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

ConstantValueDescription
visDocExIntentPrint1Intended to be published online and printed
visDocExIntentScreen0Intended to be published only online

Possible values for the PrintRange parameter are shown in the following table and declared in VisPrintOutRange in the Visio type library.

ConstantValueDescription
visPrintAll0Prints all foreground pages.
visPrintCurrentPage2Prints the active page.
visPrintCurrentView4Prints the current view area.
visPrintFromTo1Prints pages between the FromPage value and the ToPage value.
visPrintSelection3Prints a selection.

Example

The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the ExportAsFixedFormat method to export the active Visio document to the root of the C drive in PDF format.

Public Sub ExportAsFixedFormat_Example() 

    ActiveDocument.ExportAsFixedFormat visFixedFormatPDF, "C:\ExportedVisioDocument .pdf", visDocExIntentPrint, visPrintAll 

End Sub
© 2017 Microsoft