What's New in Automation for Microsoft Project 2002

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

 

Microsoft Corporation

December 2001

Applies to:
   Microsoft Project Standard 2002
   Microsoft Project Professional 2002
   Microsoft Project Web Access 2002
   Microsoft Project Server 2002

Summary: This article describes the new objects, events, properties and methods in the Microsoft Project 2002 object model. (18 printed pages)

Contents

Introduction
Methods with New, Changed, or Deleted Arguments
Hidden Properties and Methods
New Objects
New Events, Properties, and Methods
   New Methods
   New Properties
   New Events
OLE Programmatic Identifiers
   ActiveX Controls
   Microsoft Access
   Microsoft Excel
   Microsoft Graph
   Microsoft Office Web Components
   Microsoft Outlook
   Microsoft PowerPoint
   Microsoft Word
   Additional Information

Introduction

The new features within Microsoft® Project 2002 object model include better access to a variety of commonly used areas. Many objects, properties and methods have been improved or replaced. To provide backward compatibility, most of the replaced components have been hidden rather than removed. The old code that uses the hidden components will still work correctly without modification, even though the components won't show up by default in the object browser. You should, however, use the new objects, properties and methods when you write new code.

The following tables describe the new events, methods, objects, and properties in Microsoft Project 2002.

Methods with New, Changed, or Deleted Arguments

Methods with arguments that have been added to, changed in, or removed from Microsoft Project 2002, are listed in the following table (sorted alphabetically by method name). Any code that uses these items may produce errors and should be modified accordingly.

Item Object Change
BaseCalendars method Application Added Index and locked
BaselineSave method Application Added RollupToSummarytasks, RollupFromSubtasks, and SetDefaults
ConsolidateProjects method Application Deleted WriteResPassword, IgnoreReadOnlyRecommended, DatabasePassWord, and FormatID. Changed the order of the last three arguments to openPool, UserID, and Password.
CustomOutlineCodeEdit method Application Added LookupTableLink, OnlyLeaves, WARP, and RequiredCode.

Note   These new arguments are only available in Microsoft Project Professional.

MailProjectMailCustomizemethod Application Added UseAssignmentField
MailSendProjectMail method Application Added PublishScope
OptionsCalculation method Application Added MoveCompleted, AndMoveRemaining, MoveRemaining, AndMoveCompleted, EVMethod, and EVBaseline
OptionsGeneral method Application Added ShowStartupWorkpane
OptionsWorkgroup method Application Added PublishInformationOnSave, SetDefaultsMessaging (order changed), SetDefaultsWebServer (order changed), ManagerEmail, ConfirmationDialog, and ChangesMarkAssnDirty
TableEdit method Application Added HeaderAutoRowHeightAdjustment and HeaderTextWrap
TimescaleEdit method Application Added TopUnits, TopLabel, TopAlign, TopCount, TopTicks, TopUseFY, HideMajorTier, HideMinorTier, and HideTopTier
UpdateProjectToWeb method Application Added EmbedProjectFile and OnlyRegisterProject

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

Hidden Properties and Methods
New Objects
New Events, Properties, and Methods

Hidden Properties and Methods

Hidden properties and methods for visible objects are listed in the following table. Most of the hidden properties and methods have been replaced by new functionality in Microsoft Project 2002. These properties and methods are supported only for backward compatibility; for new code, you should use the replacement functionality provided in Microsoft Project 2002.

Object Hidden property or method Replacement
Application HelpQuickPreview No replacement
Application MailUpdateProject No replacement

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

New Objects
New Events, Properties, and Methods
Methods with New, Changed, or Deleted Arguments

New Objects

Objects that have been added to Visual Basic® in Microsoft Project 2002 are listed in the following table.

Object Description
EventInfo Provides cancel information of the event object. Refer to new events for more information.
Filter, Filters Provides access to filters in Microsoft Project.
Profile, Profiles Provides access to profiles in Microsoft Project.
Table, Tables Provides access to tables and table formats in Microsoft Project.
TableField, TableFields Provides access to table fields and their formatting.
View, Views Provides access to views in Microsoft Project.
ViewCombination, ViewsCombination Provides access to combination views in Microsoft Project.
ViewSingle, ViewsSingle Provides access to single-pane views in Microsoft Project.

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

New Events, Properties, and Methods
Hidden Properties and Methods
Methods with New, Changed, or Deleted Arguments

New Events, Properties, and Methods

Events, properties, and methods that have been added to existing objects, or are associated with objects new to Microsoft Project 2002, are listed in the following table (sorted alphabetically by event, property, or method name).

New Methods

New Method Objects
Apply method Filter, Table, View
EnterpriseAllowLocalBaseCalendars method Application
EnterpriseCustomizeFields method Application
EnterpriseCustomOutlineCodeShare method Application
EnterpriseGlobalBackup method Application
EnterpriseGlobalCheckOut method Application
EnterpriseGlobalRestore method Application
EnterpriseMakeServerURLTrusted method Application
EnterpriseProjectImportWizard method Application
EnterpriseProjectProfiles method Application
EnterpriseResourceGet method Application
EnterpriseResourcesImport method Application
EnterpriseResourcesOpen method Application
EnterpriseResourcesSave method Application
EnterpriseResSubstitutionWizard method Application
EnterpriseTeamBuilder method Application
FieldConstantToFieldName method Application
FieldNameToFieldConstant method Application
FileSaveOffline method Application
GetProjectServerSettings method Application
GetProjectServerVersion method Application
GoalAreaChange method Application
GoalAreaHighlight method Application
GoalAreaTaskHighlight method Application
HelpReference method Application
ImportOutlookTasks method Application
ImportResourceList method Application
IsURLTrusted method Application
LoadWebBrowserControl method Application
LocaleID method Application
MakeServerURLTrusted method Project
MicrosoftProjectOnTheWeb method Application
OpenXML method Application
OptionsInterface method Application
PublishAllInformation method Application
PublishNewAndChangedAssignments method Application
PublishProjectPlan method Application
RepublishAssignments method Application
RequestProgressInformation method Application
ResourceActiveDirectory method Application
SaveAs method Project
SearchFiles method Application
SetSidepaneStateButton method Application
SetTitleRowHeight method Application
SidepaneTaskChange method Application
SidepaneToggle method Application
SpellCheckField method Application
StopWebBrowserControlNavigation method Application
UnloadWebBrowserControl method Application
UpdateFromProjectServer method Application
View method Pane
WebBrowserControlFrame method Window
WebBrowserControlWindow method Window

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

New Objects
Hidden Properties and Methods
Methods with New, Changed, or Deleted Arguments

New Properties

New Property Objects
ActiveProfile property Profiles
AdjustHeaderRowHeight property Table
AlignData property TableField
AlignTitle property TableField
AndMoveCompleted property Project
AndMoveRemaining property Project
Assignment property GroupCriterion
AutomationSecurity property Application
AutoWrap property TableField
BaselinenCost property Assignment, Resource, Task
BaselinenDuration property Task
BaselinenDurationEstimated property Task
BaselinenFinish property Assignment, task
BaselinenStart property Assignment, task
BaselinenWork property Assignment, Resource, task
BaselineSavedDate property Project
BottomView property ViewCombination
Cancel property EventInfo
ConnectionState property Profile
CPI property Task
CVPercent property Task
DefaultEarnedValueMethod property Project
DefaultProfile property Profiles
EAC property Task
EarnedValueMethod property Task
Edition property Application
Enterprise property Calendar, Resource
EnterpriseBaseCalendar property Resource
EnterpriseCheckedOutBy property Resource
EnterpriseCostn property Assignment, Resource, Task
EnterpriseDaten property Assignment, Resource, Task
EnterpriseDurationn property Assignment, Resource, Task
EnterpriseFlagn property Assignment, Resource, Task
EnterpriseGeneric property Resource
EnterpriseInactivated property Resource
EnterpriseIsCheckedOut property Resource
EnterpriseIsTeamMember property Resource
EnterpriseLastModifiedDate property Resource
EnterpriseNameUsed property Resource
EnterpriseNumbern property Assignment, Resource, Task
EnterpriseOutlineCoden property Resource, Task
EnterpriseProjectCostn property Task
EnterpriseProjectDaten property Task
EnterpriseProjectDurationn property Task
EnterpriseProjectFlagn property Task
EnterpriseProjectNumbern property Task
EnterpriseProjectOutlineCoden property Task
EnterpriseProjectTextn property Task
EnterpriseRequiredValues property Resource
EnterpriseResourceOutlineCoden property Assignment
EnterpriseTextn property Assignment, Resource, Task
EnterpriseUniqueID property Resource
Field property TableField
Filter property ViewSingle
FilterType property Filter
GlobalBaseCalendars property Property not found
GlobalResourceFilters property Application
GlobalResourceTables property Application
GlobalTaskFilters property Application
GlobalTaskTables property Application
GlobalViews property Application
GlobalViewsCombination property Application
GlobalViewsSingle property Application
GroupAssignments property Group
GroupBySummary property Resource, Task
HighlightFilter property ViewSingle
LockFirstColumn property Table
LoginType property Profile
MoveCompleted property Project
MoveRemaining property Project
PhysicalPercentComplete property Task
Profiles property Application
ProjectGuideContent property Project
ProjectGuideFunctionalLayoutPage property Project
ProjectGuideSaveBuffer property Project
ProjectNamePrefix property Project
ProjectServerUsedForTracking property Project
PublishInformationOnSave property Project
ResourceFilters property Project
ResourceTables property Project
RowHeight property Table
Screen property View, ViewSingle
ScreenUpdating property Application
Server property Profile
ShowInMenu property Filter, Table, View
ShowRelatedSummaryRows property Filter
Single property View
SPI property Task
Status property Task
SVPercent property Task
Table property ViewSingle
TableFields property Table
TableType property Table
TaskFilters property Project
TaskOutlineNumber property Assignment
TCPI property Task
Title property Tablefield
TopView property ViewCombination
TrackingMethod property Project
UpdateProjOnSave property Project
VersionName property Project
Views property Project
ViewsCombination property Project
ViewsSingle property Project

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

New Objects
Hidden Properties and Methods
Methods with New, Changed, or Deleted Arguments

New Events

New Event Objects
LoadWebPage event Application
ProjectAfterSave event Application
ProjectAssignmentNew event Application
ProjectBeforeAssignmentChange2 event Application
ProjectBeforeAssignmentDelete2 event Application
ProjectBeforeAssignmentNew2 event Application
ProjectBeforeClearBaseline event Application
ProjectBeforeClose2 event Application
ProjectBeforePrint2 event Application
ProjectBeforeResourceChange2 event Application
ProjectBeforeResourceDelete2 event Application
ProjectBeforeResourceNew2 event Application
ProjectBeforeSave2 event Application
ProjectBeforeSaveBaseline event Application
ProjectBeforeTaskChange2 event Application
ProjectBeforeTaskDelete2 event Application
ProjectBeforeTaskNew2 event Application
ProjectResourceNew event Application
ProjectTaskNew event Application
WindowActivate event Application
WindowBeforeViewChange event Application
WindowDeactivate event Application
WindowGoalAreaChange event Application
WindowSelectionChange event Application
WindowSidepaneDisplayChange event Application
WindowSidepaneTaskChange event Application
WindowViewChange event Application
WorkpaneDisplayChange event Application

For more information about the changes to the Microsoft Project 2002 object model, refer to the following topics:

New Objects
Hidden Properties and Methods
Methods with New, Changed, or Deleted Arguments

OLE Programmatic Identifiers

You can use an OLE programmatic identifier (sometimes called a ProgID) to create an Automation object. The following tables list OLE programmatic identifiers for ActiveX® controls, Microsoft® Office applications, and Microsoft Office Web Components:

ActiveX Controls
Microsoft Access
Microsoft Excel
Microsoft Graph
Microsoft Office Web Components
Microsoft Outlook
Microsoft PowerPoint
Microsoft Word

ActiveX Controls

To create the ActiveX controls listed in the following table, use the corresponding OLE programmatic identifier.

To create this control Use this identifier
CheckBox Forms.CheckBox.1
ComboBox Forms.ComboBox.1
CommandButton Forms.CommandButton.1
Frame Forms.Frame.1
Image Forms.Image.1
Label Forms.Label.1
ListBox Forms.ListBox.1
MultiPage Forms.MultiPage.1
OptionButton Forms.OptionButton.1
ScrollBar Forms.ScrollBar.1
SpinButton Forms.SpinButton.1
TabStrip Forms.TabStrip.1
TextBox Forms.TextBox.1
ToggleButton Forms.ToggleButton.1

Microsoft Access

To create the Microsoft Access objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Access available on the machine where the macro is running.

To create this object Use one of these identifiers
Application Access.Application, Access.Application.10
CurrentData Access.CodeData, Access.CurrentData
CurrentProject Access.CodeProject, Access.CurrentProject
DefaultWebOptions Access.DefaultWebOptions

Microsoft Excel

To create the Microsoft Excel objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Excel available on the machine where the macro is running.

To create this object Use one of these identifiers Comments
Application Excel.Application, Excel.Application.10  
Workbook Excel.AddIn  
Workbook Excel.Chart, Excel.Chart.10 Returns a workbook containing two worksheets; one for the chart and one for its data. The chart worksheet is the active worksheet.
Workbook Excel.Sheet, Excel.Sheet.10 Returns a workbook with one worksheet.

Microsoft Graph

To create the Microsoft Graph objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Graph available on the machine where the macro is running.

To create this object Use one of these identifiers
Application MSGraph.Application, MSGraph.Application.10
Chart MSGraph.Chart, MSGraph.Chart.10

Microsoft Office Web Components

To create the Microsoft® Office Web Components objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Microsoft Office Web Components available on the machine where the macro is running.

To create this object Use one of these identifiers
ChartSpace OWC.Chart, OWC10.Chart
DataSourceControl OWC.DataSourceControl, OWC10.DataSourceControl
ExpandControl OWC.ExpandControl
PivotTable OWC.PivotTable, OWC10.PivotTable
RecordNavigationControl OWC.RecordNavigationControl, OWC10.RecordNavigationControl
Spreadsheet OWC.Spreadsheet, OWC10.Spreadsheet

Microsoft Outlook

To create the Microsoft Outlook® object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Outlook available on the machine where the macro is running.

To create this object Use one of these identifiers
Application Outlook.Application, Outlook.Application.10

Microsoft PowerPoint

To create the Microsoft PowerPoint® object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of PowerPoint available on the machine where the macro is running.

To create this object Use one of these identifiers
Application PowerPoint.Application, PowerPoint.Application.10

Microsoft Word

To create the Microsoft® Word objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Word available on the machine where the macro is running.

To create this object Use one of these identifiers
Application Word.Application, Word.Application.10
Document Word.Document, Word.Document.10, Word.Template.10
Global Word.Global

Additional Information

For more information, please see the Microsoft Project 2002 Object Model.