R
Rajesh R
Hi
I have written some VBA code, in MSP 2002, to detect if a
certain mpp file is open or not , if it is not open then
open it.
In VBA i am using the FileOpen command
<code>
Sub OpenTemplate()
On Error GoTo l_Errorhandler
Dim l_str_TemplateName As String
Dim l_int_ProjCnt As Integer
Dim l_tmp_TemplateName As String
Dim l_bol_ProjLoaded As Boolean
l_str_TemplateName = GetTemplateName()
If Not (l_bol_ProjLoaded) Then
l_str_TemplateName = l_str_TemplateName & ".mpp"
FileOpen l_str_TemplateName, True, , , , ,
True, "administrator", "0304admin65", "MSProject.mpp.9", ,
pjPoolReadWrite, , , False
FileOpen l_str_TemplateName
End If
l_Exit:
Exit Sub
l_Errorhandler:
Call gs_void_ErrorHandler(Err.Description, Err.Number,
Err.Source)
GoTo l_Exit
End Sub
</code>
l_str_TemplateName is the template name , now to this i
add the server url or even i tried considering the Full
Name!
But Microsoft Project 2002 throws up an error
****
Microsoft Project : 1004 : Microsoft Project cannot open
the file.
****
Please help me resolve this error !
Rgds Rajesh
I have written some VBA code, in MSP 2002, to detect if a
certain mpp file is open or not , if it is not open then
open it.
In VBA i am using the FileOpen command
<code>
Sub OpenTemplate()
On Error GoTo l_Errorhandler
Dim l_str_TemplateName As String
Dim l_int_ProjCnt As Integer
Dim l_tmp_TemplateName As String
Dim l_bol_ProjLoaded As Boolean
l_str_TemplateName = GetTemplateName()
If Not (l_bol_ProjLoaded) Then
l_str_TemplateName = l_str_TemplateName & ".mpp"
FileOpen l_str_TemplateName, True, , , , ,
True, "administrator", "0304admin65", "MSProject.mpp.9", ,
pjPoolReadWrite, , , False
FileOpen l_str_TemplateName
End If
l_Exit:
Exit Sub
l_Errorhandler:
Call gs_void_ErrorHandler(Err.Description, Err.Number,
Err.Source)
GoTo l_Exit
End Sub
</code>
l_str_TemplateName is the template name , now to this i
add the server url or even i tried considering the Full
Name!
But Microsoft Project 2002 throws up an error
****
Microsoft Project : 1004 : Microsoft Project cannot open
the file.
****
Please help me resolve this error !
Rgds Rajesh