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

Application.AddResourcesFromProjectServer Method (Project)

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

Opens the ** Build Team** dialog box if you are connected to Project Server and are currently in a resource view.

Syntax

expression. AddResourcesFromProjectServer

expression A variable that represents an Application object.

Return Value

Boolean

Remarks

The AddResourcesFromProjectServer method is only available in resource views and returns a trappable error (error code 1100) when applied in a non-resource view.

Example

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

Sub AddResources() 
   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
© 2018 Microsoft