MS Project 2013 – Access and Update Enterprise Project Columns

MS Project VBA Project Properties

Today I tried to access and update Enterprise project columns through a VBA Macro.

So first of all my project property is called “Master Project” and this is a simple text field. I want this field to contain the name of the master project so that I can display this in my views in Project Web App 2013

In my macros I’m cycling through the sub projects within my master project when I open my master project. The variable subproj is holding the subproject.

Enough background now it’s time to look at the actual updating of the custom Enterprise Project property.

Get Enterprise Project Properties/Columns

First step – Get the field ID for the Master Project field:

fld = ActiveProject.Application.FieldNameToFieldConstant(“Master Project”, pjProject)

Then get the current value as I don’t want to update it if it has been set before.

FieldVal = subproj.SourceProject.ProjectSummaryTask.GetField(ActiveProject.Application.FieldNameToFieldConstant(“Master Project”, pjProject))

Update Enterprise Project Properties

The final step compare if the value has to be changed or not and change it if it has changed:

If FieldVal ActiveProject.Name Then
subproj.SourceProject.ProjectSummaryTask.SetField fld, ActiveProject.Name
End If

Not difficult, but I couldn’t find anywhere to do this. So hopefully somebody will save some time with this article. If you do please let me know.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@sharepains.com

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading