Project Programmability

This blog focuses on customizations and programming for Project Web App, Project Server, Project Professional and Project Standard. Includes User Interface (UI) customizations, Project Server Interface (PSI) and Visual Basic for Applications (VBA) Programming. It also covers Business Intelligence.

September, 2010

  • Project Programmability and Business Intelligence

    My VBA macro from Project 2007 doesn't work in Project 2010!


    If you have a VBA macro that worked in Project 2007 and doesn't work in Project 2010, here are some things to try.

    There are quite a few members from Project 2007 that are deprecated and hidden in Project 2010. Some of the hidden members still work as they did in Project 2007, some simply do nothing, and using some directly results in an error. If the macro relies on a hidden member that does not work the same way in Project 2010, you can get a variety of errors. For example, the Application.AnswerWizard property and the Office.AswerWizard object are both hidden -- and the AnswerWizard no longer exists. The following macro results in a run-time error 1004 in Project 2010:

    Sub GetAnswerWizard()
        Dim aw As Office.AnswerWizard
        Set aw = Application.AnswerWizard
    End Sub

     To see the hidden members, go the VBE, press F2 for the Object Browser, right-click in the Members pane, and then click Show Hidden Members. The hidden members are in a light gray font. VBA Help does not include documentation of hidden members.

    Check the macro for members that are hidden in Project 2010, and get documentation for any of those from Project 2007 VBA Help on MSDN. Then set a breakpoint to see whether the member does what is expected.

    If the macro does not use any hidden members, trace through the macro by using breakpoints, to see what is going on. Some members in Project 2010 have additional parameters. For example, if you specify a parameter by position, such as Method(,,,"Value"), the parameter could be in the wrong order. When you use only a few parameters in a method that has many, is often best to use named parameters, for example, Method MyParam:="Value".

    Note: The September update of the Project 2010 SDK includes an update of the Project 2010 VBA Help file for local use.

  • Project Programmability and Business Intelligence

    Where is the XML file for modifying the PWA ribbon?


    Some folks have asked about the pwaribbon.xml file and modifying the ribbon in PWA for Project Server 2010. The SDK article Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid includes that information, although the article can be overlooked if you are not concerned with the JS Grid control. Here is the introductory information in the article about the pwaribbon.xml file:

    Modifying the Project Web App Ribbon with an Elements.xml File

    The Server ribbon for Project Web App is defined in the pwaribbon.xml file in [Program Files]\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\PWARibbon\listtemplates. To modify the Project Web App ribbon, you can use a custom Elements.xml file to add, change, or remove tabs, groups, and controls in the ribbon. For general information about modifying the Server ribbon in SharePoint applications, see Server Ribbon XML.


    You should not modify the pwaribbon.xml file itself. Updates and service packs can replace the pwaribbon.xml file and overwrite your changes. Changes that you make in the pwaribbon.xml file are not supported.

    You can also search MSDN for PWA ribbon. The article is at the top of the list.

  • Project Programmability and Business Intelligence

    Recently updated Project 2010 Solution Starters


    Few months ago we have announced releasing of the Solution Starters for Project 2010. We are still committed to continue evolving them - and we will showcase many of them in the future version of our wonderful Project 2010 Demonstration and Evaluation Virtual Image.

    We have not only released the source code and the deployable package, but also number of WebCasts that introduce the functionality, but also conduct deep dive into the code.

    You can find many of the solution starters in the following location -

    Go ahead to check them out - if you encounter an issue or have a question, please post the issue or question into the related Discussions library and we will follow-up shortly. 


    What's new?

    • Bulk Import Tool - made to ease migration of data from Project Portfolio Server 2007, now enables to update existing project data with new data from PPS. For more information about PPS 2007 migration - please visit Upgrade and Migration Center on Microsoft TechNet.
    • Workflow Visualization Web Part  - we had this Web Part for some time, however we updated it with a newer version that mimics to certain extent the workflow visualization you know from our Project 2010 Demonstration and Evaluation Virtual Image. It's very smart as it builds the whole workflow visualization dynamically based on the pictures you provide and highlights the current workflow stage.
    •  Report Builder Tool - now pulls down some more project workflow related-data.

    Thanks to all who work hard on this - including Sam and ICC!


  • Project Programmability and Business Intelligence

    Converting COM add-ins to VSTO for 64-bit Office apps


    64-bit Office apps--including Project 2010--do not support COM add-ins, which are 32-bit. To use the 64-bit environment, COM add-ins must be ported to a 64-bit add-in by using the Office Development Tools in Visual Studio 2010 (often referred to as Visual Studio Tools for Office, or VSTO).

    There is no direct conversion tool for porting 32-bit COM add-ins to VSTO for 64-bit Office apps. The amount of time to port a COM add-in can vary greatly, depending on the functionality and Project version for which it was designed. A simple add-in designed for 32-bit Project 2010 might take a few hours; something like Solution Starter: Scrum for Project 2003 (although I haven’t done a port) might take several weeks and require a complete redesign, because it uses features that are no longer available in Project and Excel 2003 – and it was written in VB6.


    ·         VSTO in VS 2010 supports only Office 2007 and 2010.

    ·         Carefully check the types when you convert the code (int, long, etc.).

    ·         When doing the port, you can use compiler constants to make the code usable in both 32-bit and 64-bit Office apps. See Tables of VBA Object Model Changes for a VBA example, and for a comparison of types in VB and C#.


    See also (VBA-related, not specifically for add-ins) Working with VBA in Office 2010 (32-bit) and Office 2010 (64-bit).


    You might also want to check out Add-In Express 2010; see, for example, Converting existing Office COM add-in projects to Add-in Express.


  • Project Programmability and Business Intelligence

    September update of the Project 2010 SDK


    The September 2010 update of the Project 2010 SDK download and the MSDN online release are both published.

    They have the same URLs as previous releases:                                                                                             


    ·         SDK Online:

    ·         SDK Download:

    ·         Project Developer Center  

    What's New in the conceptual and how-to topics:

    Following are the major new and updated topics in the Project 2010 SDK, since the RTM release. There were a series of changes related to ASMX web services, Windows Communication Foundation (WCF) services, and claims authentication since the beta release. The Project 2010 SDK in the MSDN online library was updated in July; the last update of the SDK download  was in May. They are in sync again.


    Updates of RTM topics:

    ·         Using Formulas and Graphical Indicators with Custom Fields

    ·         Creating Lookup Tables and Enterprise Custom Fields

    ·         Custom Fields and the Reporting Database

    ·         Overview of WCF and the PSI

    ·         Walkthrough: Developing PSI Applications Using WCF

    ·         How to: Use Impersonation with WCF

    ·         Prerequisites for WCF-Based Code Samples

    ·         Developing Project Server Workflows

    o   How to: Install and Test a Project Server Workflow

    o   How to: Deploy a Project Server Workflow

    ·         Project Server Error Codes now includes a WCF-based code example for getting a list of errors.


    New conceptual and how-to topics:

    ·         Developing PSI Extensions

    o   Creating a PSI Extension for Project Server 2010

    o   How to: Create a PSI Extension to Read Custom Fields in the RDB

    ·         Developing Project Server Web Parts

    o   Walkthrough: Creating a Project Server Web Part with a JS Grid


    In addition, the Class Library and Web Service reference for the PSI has many updated type and member descriptions, and several new code samples for PSI methods.


    What’s New in the Project 2010 SDK download:

    ·         pj14SDK.chm is an HTML Help file that includes the same updated content that is online.

    ·         WINPROJ.DEV.hxs is an update of VBA Help that includes the latest changes in the VBA object model documentation. There are also instructions for replacing the VBA Help file shipped with the Project RTM release.

    ·         Managed code reference samples contains WCF-based solutions for code samples in the managed code reference for the following methods: QueueCreateProject, ReadCustomFields2, and ReadLookupTables. The solutions also use the WriteFaultOutput method for listing errors, which is described in the Project Server Error Codes topic.

    ·         Multi-authentication samples includes the ASMX- and WCF-based solutions for multi-authentication, which are described in the Prerequisites for ASMX-Based Code Samples and Prerequisites for WCF-Based Code Samples topics.

    ·         Project Guide Add-in shows how to use Project Guide files in Project 2010, with a custom ribbon tab. The sample code uses Office development tools in Visual Studio 2010.

    ·         PSI Extensions includes the Hello solution described in Creating a PSI Extension for Project Server 2010 and the ListProjects solution described in How to: Create a PSI Extension to Read Custom Fields in the RDB.

    ·         Web Parts includes two related Web Part solutions:

    o   ListProjects is described in Walkthrough: Creating a Project Server Web Part with a JS Grid.

    o   ListProjects_Sorting extends the ListProjects solution to implement column sorting in the JS Grid control.

  • Project Programmability and Business Intelligence

    Project 2010 at Microsoft TechED Europe 2010



    As you may know Microsoft TechED Europe 2010 is taking place in November in Europe and Microsoft Project 2010 will have of course presence at the event!

    What you can look for?

    • Great event!
    • 4 dedicated sessions for Project 2010 along with a special announcement :)
    • Project 2010 booth staffed with Project experts and great Project 2010 giveaways (USB keys with Project 2010 Quick Start Training and Polo Shirts!)
    • Christophe and myself :) Yes we are going too!

    We will post more details on the sessions next week along with the session catalog going life next week!

    Christophe & Jan

Page 1 of 1 (6 items)