Project.ExportAsFixedFormat method (Project)

Exports the active project as a document in a custom PDF or XPS format.

Syntax

expression.ExportAsFixedFormat (FileName, FileType, IncludeDocumentProperties, IncludeDocumentMarkup, ArchiveFormat, FromDate, ToDate, FixedFormatExtClassPtr)

expression An expression that returns a Project object.

Parameters

Name Required/Optional Data type Description
FileName Required String Specifies the file name of the exported document. The default value is the name of the active project as a PDF file.
FileType Optional PjDocExportType Specifies whether to export the project as a PDF or an XPS document. The default value is pjPDF (0).
IncludeDocumentProperties Optional Boolean If True, the last page of the exported document includes some document properties. The default value is True.
IncludeDocumentMarkup Optional Boolean If True, the last page of the exported document includes a legend of the symbols shown in the view. The default value is True.
ArchiveFormat Optional Boolean If True, exports a PDF document in the ISO 19500-1 compliant (PDF/A) format. The default value is False.
FromDate Optional Variant The start date of the range of dates to publish. The default value is the project start date.
ToDate Optional Variant The end date of the range of dates to publish. The default value is the project end date.
FixedFormatExtClassPtr Optional Variant Pointer to a custom class in an add-in that implements the IMsoDocExporter COM interface that allows calls to an alternate implementation of code for the document format. The default is a null pointer.

Return value

Nothing

Remarks

The ExportAsFixedFormat method is similar to the DocumentExport method, except the FileName parameter is required and the optional FixedFormatExtClassPtr parameter is a pointer to a user-defined class that creates a custom PDF or XPS format.

Example

If the active project shows a Network Diagram view, the following example creates an XPS document named TestProject.xps. When you open the file in the XPS Viewer application, the last page includes document properties and a legend that shows the PERT chart symbols.

ExportAsFixedFormat FileName:="TestProject.xps", FileType:=pjXPS

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.