Archive

Posts Tagged ‘Microsoft Project 2010’

Working with Enterprise Custom Fields via VBA Macros in MS Project 2010 #MSProject #ProjectServer #SharePoint #SP2010 #in

February 15, 2011 Leave a comment

As per my previous post, my colleagues and I are working on various customisations to the Microsoft Project 2010 client in our SharePoint 2010 / Project Server 2010 integration project for an international company.

Primarily my job is to architect and implement SharePoint solutions but recently I have been getting heavily involved in Project Server and Microsoft Project.

Yesterday and today I have been having to dust off my VBA skills to aid a colleague and wil the help of MSDN forums, we were able to come to a solution.

We found that when querying Enterprise Custom Task Fields from Project Server using the GetFields method, it would return them as a string value as it was shown in the client, regardless of the field type.

If you use the same GetFields method to query a local task field, it will be returned as expected in accordance to the field type.

For Example:

Client Setup Details: 1 Day = 8 Hours (480 Minutes)

Enterprise Custom Task Field

  • Field Name: EnterpriseDurationTest
  • Field Type: Duration
  • Field Source: Enterprise Custom Task Field (Project Server)
  • Value: 1 Day
  • GetFields Method return: 1 Day

Local Custom Task Field

  • Field Name: LocalDurationTest
  • Field Type: Duration
  • Field Source: Local Task Field (Microsoft Project)
  • Value: 1 Day
  • GetFields Method return: 480 (returned in minutes)

Now this make comparison quite hard unless you start splitting the string returned from the enterprise custom field and hard coding the number of hours that make up a day.

As a work around, Jan De Messemaeker (Project MVP), helped provide an answer:

By simply taking the output of the Enterprise Custom Task Field and placing it into a spare local field, it will do the appropriate conversion for us and we can the query the local field to to our comparison.

This blog post is simply here as a reminder for myself (future projects etc.) but also as a thank you to the growing Project Server and Microsoft Project community.

Useful details and links when rolling out Microsoft Project 2010 #PS2010 #ProjectServer #SharePoint #SP2010 #MSProject #in

February 15, 2011 2 comments

In my current project where we are integrating SharePoint Server 2010 and Project Server 2010, we are starting to go into the details of rolling out the Microsoft Project 2010 client globally.

Some of the features we are implementing require VBA macros in MS Project 2010 which are brought down to the client application via the Enterprise Global Template from Project Server.

The following details and links have been useful during my investigations:

ADM Templates for Office 2010 – AD Policy Templates:

How to Digitally Sign a VBA Macro in Microsoft Project:

Registry Key to change:

  • \\HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\MS Project\Security\VBAWarnings

Registry Option Values:

  • 1 = Enable all macros (not recommended; potentially dangerous code can run)
  • 2 = Disable all macros except digitally signed macros
  • 3 = Disable all macros with notification
  • 4 = Disable all macros without notification
    NB: The text in the options match those available in the Trust Center in File > Options of the Microsoft Project 2010 Client.
%d bloggers like this: