title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.DocumentExport method (Project) |
vbapj.chm2173 |
|
project-server |
|
891bf868-1256-2688-cdb2-2bccfbf2afc2 |
06/08/2017 |
medium |
Exports the active project as a document in PDF or XPS format.
expression. DocumentExport
( _FileName_
, _FileType_
, _IncludeDocumentProperties_
, _IncludeDocumentMarkup_
, _ArchiveFormat_
, _FromDate_
, _ToDate_
)
expression An expression that returns an Application object.
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). |
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. |
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. |
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
[!includeSupport and feedback]