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

Project.ServerURL 属性 (项目)Project.ServerURL Property (Project)

office 365 dev account|上次更新日期: 2017/9/25
|
1 参与者

获取与之连接项目专业的 Project Web App 实例的 URL。有关同步的 SharePoint 任务列表,获取或设置不起作用的项目的任意值。读/写,字符串Gets the URL of the Project Web App instance with which Project Professional is connected. For a synchronized SharePoint task list, gets or sets an arbitrary value that has no effect on the project. Read/write String.

版本信息Version Information

添加版本: 项目Version added: Project

语法Syntax

表达式ServerURLexpression. ServerURL

表达式_一个表示项目对象的变量。_expression A variable that represents a Project object.

注解Remarks

如果不使用 Project Web App 连接项目, ServerURL属性会获取一个空字符串。如果使用 Project Web App 连接项目专业和活动项目是 SharePoint 任务列表同步,则ServerURL属性仍获取 URL 的 Project Web App,不对 SharePoint 任务列表的 URL。If Project is not connected with Project Web App, the ServerURL property gets an empty string. If Project Professional is connected with Project Web App and the active project is a synchronized SharePoint task list, the ServerURL property still gets the URL of Project Web App, not the URL of the SharePoint task list.

有关同步的 SharePoint 任务列表,可以设置ServerURL的值,为任意字符串,与该项目一起保存。当您关闭项目专业人员,并重新打开 SharePoint 任务列表时,则ServerURL将获取的任意值。但是,该值已上的项目或任务列表的 URL 不起作用。例如,在 VBE 中,在即时窗口中运行以下代码,然后关闭项目专业人员。For a synchronized SharePoint task list, you can set the value of ServerURL to an arbitrary string, which is saved with the project. When you close Project Professional and reopen the SharePoint task list, ServerURL gets the arbitrary value. However, that value has no effect on the project or URL of the task list. For example, run the following code in the Immediate window of the VBE, and then close Project Professional.

ActiveProject.ServerURL = "http://SomeBogusServer/NOP%20No%20URL"

重新启动项目专业、 打开 SharePoint 任务列表中,并运行? ActiveProject.ServerURL即时窗口中。该语句返回的任意字符串。Start Project Professional again, open the SharePoint task list, and then run ? ActiveProject.ServerURL in the Immediate window. The statement returns the arbitrary string.

企业项目对于该项目的服务器的管理,如果您尝试设置的值ServerURL,项目所示的运行时错误 1101,"参数值是无效"。For an enterprise project that Project Server manages, if you try to set the value of ServerURL, Project shows a run-time error 1101, "The argument value is not valid."

属性值Property value

STRINGSTRING

另请参阅See also

概念Concepts

项目对象Project Object

© 2018 Microsoft