Table of contents
TOC
折叠目录
展开目录

Application.MakeLocalCalendarEnterprise 方法 (项目)Application.MakeLocalCalendarEnterprise Method (Project)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

将本地日历转换为企业日历。Converts a local calendar to an enterprise calendar.

语法Syntax

表达式MakeLocalCalendarEnterprise(* 原名新名称)expression. **MakeLocalCalendarEnterprise( ** OldName, ** NewName* )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
原名OldName可选OptionalStringString本地日历的名称。Name of the local calander.
新名称NewName可选OptionalStringString企业日历的名称。Name of the Enterprise calander.

返回值Return Value

BooleanBoolean

注解Remarks

不使用该_新名称_参数。例如,如果本地日历命名为"TestCal",执行代码MakeLocalCalendarEnterprise OldName:="TestCal", NewName:="New TestCal",其结果是名为"TestCal"企业日历。The NewName parameter is not used. For example, if a local calendar is named "TestCal" and you execute the code MakeLocalCalendarEnterprise OldName:="TestCal", NewName:="New TestCal" , the result is an enterprise calendar named "TestCal".

项目专业人员登录到项目服务器时,请创建本地日历,您必须检查 Project Web Access 中其他服务器设置页允许项目使用本地基准日历。在 Project Web Access 设置更改后重新启动项目专业人员。To create a local calendar when Project Professional is logged on to Project Server, you must check Allow projects to use local base calendars on the Additional Server Settings page in Project Web Access. Restart Project Professional after changing the setting in Project Web Access.

示例Example

下面的示例创建名为TestCal,一个本地日历,然后将其另存为具有相同名称的企业日历。如果项目专业人员没有登录 Project Server, MakeLocalCalendarEnterprise将导致运行时错误 1100年。The following example creates a local calendar named TestCal, and then saves it as an enterprise calendar with the same name. If Project Professional is not logged on Project Server, MakeLocalCalendarEnterprise results in a run-time error 1100.

Sub TestCalendar() 
 BaseCalendarCreate Name:="TestCal" 
 MakeLocalCalendarEnterprise OldName:="TestCal" 
End Sub
© 2018 Microsoft