Share via


Project.MakeServerURLTrusted Method

Project Developer Reference

This method adds the Server URL specified in the Project.ServerURL property to the trusted sites Web content zone of Microsoft Internet Explorer.

Syntax

expression.MakeServerURLTrusted

expression   A variable that represents a Project object.

Remarks

If no Server URL is specified for the project, Microsoft Office Project 2007 displays an error message stating: "A Project Server URL has not been specified. To specify a URL, on the Tools menu, click Options, and then click the Collaboration tab."

Example

The following sample adds the URL specified in Collaboration Options (Collaborate menu) to the list of trusted sites in Microsoft Internet Explorer. Upon confirmation, Office Project 2007 switches to a Resource Sheet view and displays the Build Team from Project Server dialog box, if connected to My Computer in workgroup mode. Office Project 2007 displays the Build Team from <Project Name> dialog box when connected to Microsoft Office Project Server 2007.

Visual Basic for Applications
  Sub MakeURLTrusted()
   If Projects.Count = 0 Then
      MsgBox "You must have at least one active project open."
      Exit Sub
   End If

If ActiveProject.ServerURL = "" Then MsgBox "A Project Server URL has not been " _ & "specified." & Chr(13) & "Click OK to select " _ & "'Collaborate Using Project Server' and " _ & "specify a valid URL in the Options dialog box " _ & "(Tools menu)." Application.OptionsWorkgroup Else ActiveProject.MakeServerURLTrusted ViewApply Name:="Resource Sheet" Application.AddResourcesFromProjectServer End If End Sub

See Also