J
jlandry
Hello,
I am struggling with some feature during saving operation within MS Project
Pro 2007 UI.
The solution I am currently implanting is requiring to hide the SAVE dialog
window when the user clicks on the disk icon or use the save menu. I did try
a lot of things but I am still unable to avoid the dialog to display. If you
look at the code below, you’ll notice that even if I set the SaveAsUi
parameter to False, the dialog will show up no matter what I do:
Public Sub Application_ProjectBeforeSave2(ByVal pj As Project, ByVal
SaveAsUi As Boolean, ByVal Info As EventInfo)
On Error GoTo Error_Handler
' Cancelling MS "SaveAs" dialog window display
'
SaveAsUi = False
' Cancelling SAVE operation for all case of figure occurring in
ValidateBeforeSave method
'
Info.Cancel = True
If Not pj Is Nothing Or Not CurrentProject.IsClosing Then
If Not CurrentProject.HasErrors Then
Call ValidateBeforeSave
End If
End If
' Authorizing/Cancelling SAVE operation according to current project
validity
'
Info.Cancel = CurrentProject.HasErrors
GoTo End_Line
Error_Handler:
Call ManageErrors(Err)
End_Line:
ProjectCustomFieldsClient = Nothing
ProjectCustomFieldsServer = Nothing
End Sub
Is it wrong for me to think that I can hide this dialog window or is there
something I missed in order to avoid that dialog window to display in the UI
during saving operation?
Here are the issues that I need to solve:
1. I need to assigned a proposed project’s name in the textbox of that
dialog window, which I can’t (or don’t know how) since the textbos seems to
be unavailable programmatically
2. I need to restrict users to edit custom fields values while saving
since all validations have already been performed on “Project information…â€
dialog window closure
Any help will be welcomed.
Best regards
I am struggling with some feature during saving operation within MS Project
Pro 2007 UI.
The solution I am currently implanting is requiring to hide the SAVE dialog
window when the user clicks on the disk icon or use the save menu. I did try
a lot of things but I am still unable to avoid the dialog to display. If you
look at the code below, you’ll notice that even if I set the SaveAsUi
parameter to False, the dialog will show up no matter what I do:
Public Sub Application_ProjectBeforeSave2(ByVal pj As Project, ByVal
SaveAsUi As Boolean, ByVal Info As EventInfo)
On Error GoTo Error_Handler
' Cancelling MS "SaveAs" dialog window display
'
SaveAsUi = False
' Cancelling SAVE operation for all case of figure occurring in
ValidateBeforeSave method
'
Info.Cancel = True
If Not pj Is Nothing Or Not CurrentProject.IsClosing Then
If Not CurrentProject.HasErrors Then
Call ValidateBeforeSave
End If
End If
' Authorizing/Cancelling SAVE operation according to current project
validity
'
Info.Cancel = CurrentProject.HasErrors
GoTo End_Line
Error_Handler:
Call ManageErrors(Err)
End_Line:
ProjectCustomFieldsClient = Nothing
ProjectCustomFieldsServer = Nothing
End Sub
Is it wrong for me to think that I can hide this dialog window or is there
something I missed in order to avoid that dialog window to display in the UI
during saving operation?
Here are the issues that I need to solve:
1. I need to assigned a proposed project’s name in the textbox of that
dialog window, which I can’t (or don’t know how) since the textbos seems to
be unavailable programmatically
2. I need to restrict users to edit custom fields values while saving
since all validations have already been performed on “Project information…â€
dialog window closure
Any help will be welcomed.
Best regards