Application.DocumentExport Method (Project)
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

Application.DocumentExport Method (Project)

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

Version Added: Project 2010

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

expression An expression that returns an Application object.

Parameters

Name

Required/Optional

Data Type

Description

FileName

Optional

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).

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.

IncludeDocumentProperties

Optional

Variant

If True or 1, the last page of the exported document includes some document properties. The default value is True.

IncludeDocumentMarkup

Optional

Variant

If True or 1, the last page of the exported document includes a legend of the symbols shown in the view. The default is True.

ArchiveFormat

Optional

Variant

If True or 1, exports a PDF document in the ISO 19500-1 compliant (PDF/A) format. The default value is False.

Return Value

Boolean

Running the DocumentExport method without any parameters brings up the Browse dialog box and the name of the active project as a PDF file. If the user cancels the Browse or the subsequent Document Export Options dialog box, DocumentExport returns False.

To export a custom format PDF or XPS document, where you can use a pointer to a class in an add-in, see ExportAsFixedFormat.

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.

DocumentExport FileName:="TestProject.xps", FileType:=pjXPS
Show:
© 2016 Microsoft