none
Problem when using the Newproject event RRS feed

  • Question

  • Hello everybody,

    I wanted to use the Newproject event in order to initialize some parameters when a new project is created (like the project start date). After a few numbers of test it appear that this even occurred when a new project is created (perfect!)  and when an existing project is opened as well (bad!). So did I miss something or is it a bug?

    (I am using Project 2007)

    Wednesday, September 29, 2010 12:02 PM

Answers

  • It works perfectly when I test if project.type= pjProjectTypeUnsaved

    Thanks again

    • Marked as answer by Daniel_358 Wednesday, September 29, 2010 1:38 PM
    Wednesday, September 29, 2010 1:37 PM

All replies

  • Hi Daniel,

    This is by design. The NewProject event occurs when a new project is created, including the default project created each time Microsoft Office Project 2007 starts, and is analogous to the Open event for existing projects. The NewProject event occurs before the new project's Activate event.

    In the event, you need to check if the project is a new or existing project based on a project attribute. You can define your own, or you can use Project.Type.

    I hope this helps,
    Hans


    My EPM blog: Projectopolis
    Wednesday, September 29, 2010 12:27 PM
    Moderator
  • Hi Hans

    OK, I will try to test the project type. I guess I have to test if type= pjProjectTypeUnsaved for a new project?

    Thanks

    Wednesday, September 29, 2010 1:04 PM
  • It works perfectly when I test if project.type= pjProjectTypeUnsaved

    Thanks again

    • Marked as answer by Daniel_358 Wednesday, September 29, 2010 1:38 PM
    Wednesday, September 29, 2010 1:37 PM