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

Application.ConsolidateProjects Method (Project)

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

Displays the data from one or more projects in a single window.

Syntax

expression. ConsolidateProjects( ** Filenames, ** NewWindow, ** AttachToSources, ** PoolResources, ** HideSubtasks, ** openPool, ** UserID, ** Password )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
FilenamesOptionalStringOne or more file names of projects to consolidate.
NewWindowOptionalBooleanTrue if projects are inserted (consolidated) into a new project. False if projects are inserted into the active project at the selection point. The default value is False.
AttachToSourcesOptionalBooleanTrue if changes in the consolidated project affect source projects. The default value is True.
PoolResourcesOptionalVariantThe PoolResources argument is ignored in Project. It is retained so that existing macros that use this argument do not cause errors.
HideSubtasksOptionalBooleanTrue if the subtasks of the projects specified with Filenames are hidden. The default value is True.
openPoolOptionalLongThe action to take when opening a resource pool or sharer file. When opening a master project, the value for this argument is also applied to the subprojects. Can be one of the following PjPoolOpen constants. The default value is pjPromptPool.
UserIDOptionalVariantA user ID to use when accessing a project in a database. If Filenames does not refer to a database, UserID is ignored.
PasswordOptionalStringA password to use when opening password-protected project files. If Password is incorrect or omitted and a file requires a password, the user is prompted for the password.

Return Value

Boolean

Remarks

To specify that a consolidated project should be inserted as read-only, append "(R/O)" to the file name in the Filenames argument.

Example

The following example creates a consolidated project, prints a report, and closes the consolidated project without saving it.

Sub ConsolidatedReport() 
    ConsolidateProjects Filenames:="Project1.mpp" &; ListSeparator &; "Project2.mpp", NewWindow:=True 
    ReportPrint Name:="Critical Tasks" 
    FileClose Save:=pjDoNotSave 
End Sub
© 2018 Microsoft