Project.GetObjectMatchingID Method (Project)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns the matching identification name of an object.

expression .GetObjectMatchingID(ObjectType, ObjectName)

expression A variable that represents a Project object.

Parameters

Name

Required/Optional

Data Type

Description

ObjectType

Required

Long

The type of object. Can be one of the PjOrganizer constants.

ObjectName

Required

String

Display name of the object.

Return Value

String

You can use the GetObjectMatchingID method to get the display name in a multilanguage environment that uses Object Matching Identifier (OMID) fields. For more information, see the UseOMIDs property.

The following example gets the Matching ID of a View object with the display name "My Gantt Chart".

MsgBox(ActiveProject.GetObjectMatchingID(pjView, "Gantt Chart"))
Show: