Delphiki1Z
Delphiki1Z

Reputation: 57

Get MS Project Title (Not Name)

I need to get the Title of a project rather than the name of it. This can be done using the ProjectSummaryInfoEx method for the application object but I'm not sure how to get this line to return the value I need. Without any commands, it simply opens up the Summary info dialog box, and any inputs I provide come back as an invalid argument.

Any help anyone can provide would be greatly appreciated.

Upvotes: 2

Views: 386

Answers (2)

Kenny Arnold
Kenny Arnold

Reputation: 374

In addition to Rachel's answers, you can also use this:

ActiveProject.Tasks.UniqueID(0).Name

UID zero will always be the project summary task, and the name property will be the title of the project.

Upvotes: 2

Rachel Hettinger
Rachel Hettinger

Reputation: 8442

I suggest using:

ActiveProject.BuiltinDocumentProperties("Title")

or a property of the Project object such as:

ActiveProject.Name

References: Application object, Project object, BuiltinDocumentProperties

Upvotes: 3

Related Questions