Share via


Project Object, Projects Collection Object

Application
Projects
Project
Multiple objects

Represents a project or all open projects. The Project object is a member of the Projects collection.

Using the Project Object

Use Projects(Index), where Index is the project index number or project name, to return a single Project object. The following example switches among all the open projects, memorizes the full name of each, and then displays the results.

Dim Temp As Long, Names As String

For Temp = 1 To Projects.Count
    Projects(Temp).Activate
    Names = Names & Projects(Temp).FullName & vbCrLf
Next Temp

MsgBox Names

Using the Projects Collection

Use the Projects property to return a Projects collection. The following example counts the number of open projects.

Application.Projects.Count

Because the Projects collection is a top-level object, the following example is functionally identical to the one above.

Projects.Count

Use the Add method to add a Project object to the Projects collection. The following example creates a new project without prompting for project information.

Projects.Add False

Properties | Application Property | BaseCalendars Property | BaselineSavedDate Property | BuiltinDocumentProperties Property | Calendar Property | CanCheckIn Property | CodeName Property | CommandBars Property | Container Property | CreationDate Property | CurrentFilter Property | CurrentGroup Property | CurrentTable Property | CurrentView Property | CustomDocumentProperties Property | DocumentLibraryVersions Property | FullName Property | HasPassword Property | ID Property | Index Property | LastPrintedDate Property | LastSaveDate Property | LastSavedBy Property | MapList Property | NumberOfResources Property | NumberOfTasks Property | OutlineChildren Property | OutlineCoden Property | Parent Property | Path Property | ProjectNamePrefix Property | ProjectSummaryTask Property | ReadOnly Property | ReadOnlyRecommended Property | ReportList Property | ResourceFilterList Property | ResourceFilters Property | ResourceGroupList Property | ResourceGroups Property | ResourcePoolName Property | Resources Property | ResourceTableList Property | ResourceTables Property | ResourceViewList Property | RevisionNumber Property | Saved Property | SharedWorkspace Property | Subprojects Property | TaskFilterList Property | TaskFilters Property | TaskGroupList Property | TaskGroups Property | Tasks Property | TaskTableList Property | TaskTables Property | TaskViewList Property | Template Property | Type Property | UniqueID Property | UserControl Property | VBProject Property | VersionName Property | ViewList Property | Views Property | ViewsCombination Property | ViewsSingle Property | WriteReserved Property

Methods | Activate Method | Add Method | AppendNotes Method | CanCheckOut Method | CheckIn Method | CheckOut Method | LevelClearDates Method | MakeServerURLTrusted Method | SaveAs Method

Events | Activate Event | BeforeClose Event | BeforePrint Event | BeforeSave Event | Calculate Event | Change Event | Deactivate Event | Open Event

Parent Objects | Application Object

Child Objects | Calendar Object, Calendars Collection Object | Filter Object, Filters Collection Object | List Object | OutlineCode Object, OutlineCodes Collection Object | Resource Object, Resources Collection Object | ResourceGroups Collection Object | Subproject Object, Subprojects Collection Object | Table Object, Tables Collection Object | Task Object, Tasks Collection Object | TaskGroups Collection Object | View Object, Views Collection Object | ViewCombination Object, ViewsCombination Collection Object | ViewSingle Object, ViewsSingle Collection Object | Window Object, Windows Collection Object | Windows2 Collection Object

See Also | ActiveProject Property | Projects Property