Application.NewProject Event
Project Developer Reference |
Occurs when a new project is created, including the default project created each time Microsoft Office Project 2007 starts.
Syntax
expression.NewProject(pj, )
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
pj | Required | Project | The project that was created. |
Remarks
The NewProject event for the default project is analogous to the Open event for existing projects. The NewProject event occurs before the Activate event for a new project. Project events do not occur when the project is embedded in another document or application. For more information and sample code for creating and testing an event handler, see Using Events with Application and Project Objects.
Example
The following example sets the number of working hours per day for every new project created. This example requires a new class module and additional code for it to work.
Visual Basic for Applications |
---|
|
See Also