Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.GlobalBaseCalendars Property (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets or sets a Calendars collection representing the base calendars of the Global.mpt file. Read/write Calendars.

Syntax

expression. GlobalBaseCalendars

expression A variable that represents an Application object.

Remarks

To add a calendar to the enterprise global template, first create a local calendar, and then add the local calendar to the enterprise global template with the MakeLocalCalendarEnterprise method.

To enable creating local base calendars in an enterprise project, check Allow projects to use local base calendars on the Additional Server Settings page in Project Web App.

Example

The following example creates a local base calendar and then imports the calendar to the enterprise global template.

Note The GlobalBaseCalendars property is the collection of calendars in the local Global.mpt file, not in the enterprise global template.

Sub CreateEGlobalCalendar() 
    Dim globalCalendar As Calendar 

    BaseCalendarCreate Name:="NewBaseCalendar" 
    MakeLocalCalendarEnterprise OldName:="NewBaseCalendar", NewName:="NewBaseCalendar" 

    Debug.Print "Number of calendars in Global.mpt: " &; GlobalBaseCalendars.Count 

    For Each globalCalendar In GlobalBaseCalendars 
        Debug.Print globalCalendar.Name 
    Next globalCalendar 
End Sub
© 2018 Microsoft