Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.78 KB

Project.Application.GlobalBaseCalendars.md

File metadata and controls

58 lines (36 loc) · 1.78 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.GlobalBaseCalendars property (Project)
vbapj.chm132295
vbapj.chm132295
project-server
Project.Application.GlobalBaseCalendars
98a498f9-e040-9b00-e84a-806a8a17a181
06/08/2017
medium

Application.GlobalBaseCalendars property (Project)

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

[!includeSupport and feedback]