Project Server 2010 - Bulk Baseline Projects Programatically RRS feed

  • Question

  • I need to develop a program to bulk baseline project in project server 2010.  I have more than 5000 projects and need to provide an user interface and also automation to bulk baseline the projects. Need some guidance/reference.

    Any suggestion / web urls is more helpful. I am new to project 2010 development.



    Monday, August 12, 2013 1:30 PM

All replies

  • Is there anyother way, I am looking for sample code.

    In someother forums its mentioned that we can use winproj.exe from c# to do the baseline?


    Wednesday, August 14, 2013 2:40 AM
  • Hi Arulanantham,

    I dont think that is possible, as PS 2010 do not have provision to set baseline, so neither it can be done programatically.


    Thanks, Kashif

    Wednesday, August 14, 2013 12:50 PM
  • Hi,

    There is no way to programatically baseline projects from Project Server in 2010 or 2013 (the feature is there in PWA, but it's private / protected) :(

    Your only option is to look at some form of Project Professional automation.

    Alex Burton | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page

    Thursday, August 15, 2013 2:54 AM
  • I know nothing of server development, but I can see how you could achieve it with client development in VBA.

    One way would be to add all the projects to a master schedule as subprojects, then you could just loop through the subprojects collection setting the baseline as you go - something like this:

    Sub SetBaselineOnAllSPJs()
        Dim spj As Subproject
        For Each spj In activeProject.Subprojects
        Next spj
    End Sub

    A more advanced solution, if you knew the location where project files were stored, you could write a routine that picks out every file with the mpp extension from that location, then opens it and sets the baseline, or maybe inserts it to the master schedule as a sub project, then uses the method above.

    It's going to take a while to run though - you'd probably also want to implement some sort of progress feedback (like a progress bar) so that the user is reassured it hasn't stopped in its tracks.

    Hope this helps,

    Thursday, August 15, 2013 9:12 AM
  • Thanks everyone for the reply. 

    Since I am novice developer, it would be great if any blogs, articles where i can refer.


    Friday, August 16, 2013 2:44 PM
  • Here are the most basic of steps

    Open Visual Basic Editor
    Insert -> UserForm

    right click form -> properties
    Change (Name) to Baseliner
    add as many text boxes as you need (ie. 12)
    add one button
    double click that button... creates

    Private Sub CommandButton1_Click()

    Dim controlplanname
    If TextBox1.TextLength <> 0 Then
        controlplanname = "<>\" & Trim(TextBox1.Text) & ".Published"
        FileOpen Name:=controlplanname
        BaselineSave All:=True, Copy:=0, Into:=0
     FileClose pjSave   
    End If

    If TextBox2.TextLength <> 0 Then
        controlplanname = "<>\" & Trim(TextBox2.Text) & ".Published"
        FileOpen Name:=controlplanname
        BaselineSave All:=True, Copy:=0, Into:=0
     FileClose pjSave
    End If


    End Sub

    Insert -> Module

    Sub Form_ShowTheBaseliner()
    End Sub

    Run Macro from Tools->Macro (Form_ShowTheBaseliner)

    Copy and paste the project names into each box
    then click the button. Go get coffee.

    After coffee develop the looping constructs needed to automate further

    Friday, August 16, 2013 3:18 PM