Lesson 5: Sorting and Multiple Projects

Lesson Objectives

Upon completion of this lesson, the participant will be able to:

Some Topics to be introduced in this lesson include:

Sort Method

The Sort Method allows the user to sort the tasks or resources in the active pane. The user supplies the keys and direction, either ascending or decending

Sort Key1:="Priority", ascending1:=True, Key2:="Start",

ascending2:=False, renumber:=false, outline:=False

Multiple Projects

Consolidation

The ConsolidateProjects Method allows the user to consolidate many projects together into one. The syntax is:

ConsolidateProjects filenames, newWindow, attachToSources,_

poolResources, hideSubtasks

filenames is a listing of the different files you want to consolidate.

newWindow specifies whether to create a new window for the projects you specify with the filenames argument.

attachToSources specifies whether changes in the consolidated project affect source projects.

poolResources specifies whether to pool the resources of the projects you specify with the filenames argument

hideSubtasks specifies whether to hide the subtasks of the projects you specify with the filenames argument.

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

Sub ConsolidatedReport()

ConsolidateProjects Filenames := "project1.mpp,project2.mpp"

ReportPrint Name:="Critical Tasks"

FileClose save := pjDoNotSave

End Sub

Resource Sharing

The ResourceSharing Method allows Control over resource sharing. It takes three arguments.

object.ResourceSharing share, name, pool

share specifies whether to share resources.

name specifies the filename of the resource pool.

pool specifies whether resources in the pool take precedence over resources in the local project.

The following line of code sets the active project to use resources from a file called "Pool.mpp"

ResourceSharing share:=True, name:="Pool.mpp"

The ResourceSharingPoolAction Method Performs specific actions on a resource pool.

ResourceSharingPoolAction action, fileName, readOnly

By setting the action parameter it will do 1 of 5 actions: Causes the resource pool to take precedence over the sharers. Causes the sharers to take precedence over the resource pool. Opens the sharer (the file specified with the fileName argument). Opens all sharers into a consolidated project or Unlinks the sharer from the resource pool. (The sharer is specified with the fileName argument.)

A property that can be useful is the resourcePoolName property. It simply Returns the filename of the resource pool used by a project. If it is not using a resource pool it returns the name of the project.

msgbox resourcePoolName