Application.ManageSiteColumns method (Project)
Displays the Manage Fields dialog box, which enables synchronizing built-in fields and custom fields in a local project with specified columns in a SharePoint 2013 tasks list.
Syntax
expression. ManageSiteColumns
expression An expression that returns an Application object.
Return value
Boolean
Remarks
The ManageSiteColumns method is available only in Project Professional, with a local project that has been saved to a SharePoint task list. For more information, see the SynchronizeWithSite method.
The following table shows the columns and default synchronized fields in the Manage Fields dialog box. By default, the Priority and Task Status SharePoint columns are not synchronized with any Project field, so those items are empty.
Sync | Project Field | SharePoint Column |
---|---|---|
Yes | Name | Title |
Yes | Start | Start Date |
Yes | Finish | Due Date |
Yes | % Complete | % Complete |
Yes | Resource Names | Assigned To |
Yes | Predecessors | Predecessors |
No | Priority | |
No | Task Status |
Example
To add the Priority field in the Project Field column and synchronize with the Priority column in SharePoint, try the following:
- Rename a text custom field in Project; for example, name Text1 as SharePoint Priority.
- Run the ManageSiteColumns method, and then in the Manage Fields dialog box, select SharePoint Priority (Text1) in the Project Field drop-down list that corresponds to Priority in the SharePoint column.
- Run the SyncPriority macro.
Sub SyncPriority()
Dim tsk As Task
Dim msfPriority As String
Application.SynchronizeWithSite
For Each tsk In ActiveProject.Tasks
msfPriority = tsk.Text1
Select Case msfPriority
Case "(1) High"
tsk.Priority = 700
Case "(2) Normal"
tsk.Priority = 500
Case "(3) Low"
tsk.Priority = 300
End Select
Next tsk
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.