none
Template (.mpt) deployment on Project Server 2007 using PSI RRS feed

  • Question

  • Hi,

    Please help...

    How to deploy the MS Project 2007 Template (.mpt file) programmatically on all PWA instances of a Project Server ?

    I have not found any PSI to do this job. I have to automate the multiple template deployment process using PSI methods.

    Please let me know if anyone worked on this.

    Thanks in Advance.

    ...Ajju 

    Monday, October 25, 2010 5:32 AM

Answers

  • Hey Rod,

    Thanks for your reply. Sorry I am back on the same topic after long period.

    But this time I am looking for the solution as below:

    1. Open the Project Template files (.mpt) from local machine using Office COM Interop

    2. Connect the Project Server Instance programatically.

    3. Save As Project Template file on Project Server Instance using Office COM Interop.

    Is it possible? 

    If you have any references/material related to this solution please share with me. FYI, I will be using C#.Net for development and Project Server version will be 2007.

    Thanks in advance!

    ...Ajju  

    • Marked as answer by Ajjudesh Tuesday, June 21, 2011 10:54 AM
    Tuesday, November 23, 2010 11:27 AM

All replies

  • Hi,

     

    Check the Project SDK, but I don't think there is a PSI call to move .mpt file. But which .mpt do you mean?

    If it's the Global.Mpt file then that is local and definitely cannot be moved by PSI. If It's the Enterprise Global then there is only one and it lives on the Server. If it's a template for a project, you have to save it in Project Server using Project Pro.

    Can you explain more what you want and expect?


    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Monday, October 25, 2010 6:31 AM
    Moderator
  • Hi Rod,

    Thanks for your reply.

    I don't have to do anything with Global.mpt.

    I have to create my own custom template file (like MyTemplate.mpt) and save it to Project Server.

    Currently I have created a template using Project Pro and save it as .mpt file. Based on  MyTemplate.mpt file I am creating and deploying a projects programmatically(using PSI).


    Now I have to automate this process of creating template file so end user will provide me bunch of templates in a folder and I will save then on all PWA instances on a Managed Project Server Environment programmatically.

    Please let me know if you need more details.

    Thanks,

    Ajju

      

    Monday, October 25, 2010 7:17 AM
  • Standard practice is to use Project Pro to save a template to Project Server after which all Project Pro users can see the template under File, New and Enterprise Templates. Only Project Pro can create .mpt files so PSI can't.

    Templates are not stored in PWA unless as a file under Documents. Since .mpt templates only work in Project Pro it doesn't make sense to treat as a document. To automate Project Pro use VBA code but you will have to open Project Pro and login to each instance in turn. You can however automate Project from Excel and provide teh instance name when starting Project Pro with the VBA Shell command.

    PWA does not store .mpt templates, I think they are saved directly into the draft db by Project Pro.


    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Tuesday, October 26, 2010 12:57 AM
    Moderator
  • Hi Rod,

    Thanks for your suggestion.

    I went through http://www.mcse.ms/archive/index.php/t-2292457.html discussion between you and Strider. There I came to know that we can directly save the .mpp file into Database. But this is possible in SQL 2000.

    Still I am curious if this can be done in Project Pro 2007 i.e. SQL 2005. Since in my case, I have to save the .mpt file in draft database.

    Can you please provide me info on this if it is possible? The information given in the above link is little bit confusing.

    OR is it possible to read the template file from a particular folder (using C# code)? Then pass the dataset to QueueCreateProject method of Project PSI to create the template.

    I am not sure at this moment which would be best option.

    Please let me  know what you think on this.

    Thanks,

    ...Ajju 

    Tuesday, October 26, 2010 7:16 AM
  • Code to create a project via PSI is time consuming and requires advanced skills. Time to create a macro to save a project: seconds! Project 2007 onwards does not support saving projects into any database other than a Project Server database.

    Rod Gill

    The one and only Project VBA Book Rod Gill Project Management
    Thursday, October 28, 2010 8:33 PM
    Moderator
  • Hey Rod,

    Thanks for your reply. Sorry I am back on the same topic after long period.

    But this time I am looking for the solution as below:

    1. Open the Project Template files (.mpt) from local machine using Office COM Interop

    2. Connect the Project Server Instance programatically.

    3. Save As Project Template file on Project Server Instance using Office COM Interop.

    Is it possible? 

    If you have any references/material related to this solution please share with me. FYI, I will be using C#.Net for development and Project Server version will be 2007.

    Thanks in advance!

    ...Ajju  

    • Marked as answer by Ajjudesh Tuesday, June 21, 2011 10:54 AM
    Tuesday, November 23, 2010 11:27 AM