V
Vadim Roulnov
Hi all,
All tasks in all projects on out project server have EnterpriseOutlineCode1
set mandatory. When a project is being saved MSProjectPro checks that all
mandatory fileds and outline codes are filled in with proper values and do
not let the project to be saved until they are not. To make life easier I
wanted to use Project_BeforeSave event so set default value:
Private Sub Project_BeforeSave(ByVal pj As Project)
Dim t As Task
For Each t In pj.Tasks
If Not t Is Nothing And Not t.ExternalTask Then
If t.EnterpriseOutlineCode1 = "" Then t.EnterpriseOutlineCode1
= "Other"
End If
Next t
End Sub
And what? MSProjectPro checks mandatory fields BEFORE this event occures and
the code above is executed. It is rather stupid IMHO, but which way could
this code be executed earlier than MSProject's mandatory field check?
Thank you.
-Vadim
All tasks in all projects on out project server have EnterpriseOutlineCode1
set mandatory. When a project is being saved MSProjectPro checks that all
mandatory fileds and outline codes are filled in with proper values and do
not let the project to be saved until they are not. To make life easier I
wanted to use Project_BeforeSave event so set default value:
Private Sub Project_BeforeSave(ByVal pj As Project)
Dim t As Task
For Each t In pj.Tasks
If Not t Is Nothing And Not t.ExternalTask Then
If t.EnterpriseOutlineCode1 = "" Then t.EnterpriseOutlineCode1
= "Other"
End If
Next t
End Sub
And what? MSProjectPro checks mandatory fields BEFORE this event occures and
the code above is executed. It is rather stupid IMHO, but which way could
this code be executed earlier than MSProject's mandatory field check?
Thank you.
-Vadim