'Here is the Macro!
Private Sub CheckProjectProVersion()
Dim fso As New FileSystemObject
Dim myVersion As String
Dim FileFoundFlag As Boolean
Const ErrMsgSuffix As String = vbCrLf & vbCrLf & "Please resolve this
problem as follows:" & vbCrLf & _
"1. Send an email message to the PMO at (e-mail address removed) with
a screen shot of this error message: " & vbCrLf & _
"2. Open a Support Desk ticket for this error"
On Error Resume Next
Err.Clear
FileFoundFlag = (fso.FileExists(Application.Path + "\WinProj.exe"))
If Err.Number <> 0 Then
MsgBox "Error #FE0N:" & vbCrLf & "Project Version Cannot be Determined:
Missing FSO: " & Err.Description & ErrMsgSuffix, vbCritical +
vbApplicationModal, "System Error"
Err.Clear
Else
If FileFoundFlag = False Then
MsgBox "Error #FFFF:" & vbCrLf & "Project Version Cannot be
Determined: Missing Executable: " + Application.Path + "\WinProj.exe" &
ErrMsgSuffix, vbCritical + vbApplicationModal, "System Error"
Else
myVersion = CStr(fso.GetFileVersion(Application.Path +
"\WinProj.exe"))
If Err.Number <> 0 Then
MsgBox "Error #FSOV:" & vbCrLf & " Project Version Cannot be
Determined: Missing FSO: " & Err.Description & ErrMsgSuffix, vbCritical +
vbApplicationModal, "System Error"
Err.Clear
Else
If myVersion = "" Then
MsgBox "Error #FVMN:" & vbCrLf & "Project Version
Missing" & ErrMsgSuffix, vbCritical + vbApplicationModal, "System Error"
Else
If (myVersion = "11.0.2003.816") Or (myVersion =
"11.1.2004.1707") Then
'If myVersion <> "11.2.2005.1801" Then
MsgBox "SYSTEM ERROR:" & vbCrLf & vbCrLf & "Your copy of
MS Project Pro does not have Service Pack 2. You must close the program
immediately without saving or you may damage your project data." & vbCrLf &
vbCrLf & _
"Please resolve this problem as follows:" & vbCrLf & _
"1. Send an email message to the PMO at (e-mail address removed) with
a screen shot of this error message: " + myVersion & vbCrLf & _
"2. Open a Support Desk ticket for the installation of
Project Pro Service Pack." & vbCrLf & vbCrLf & "Error: VNNV", vbCritical +
vbApplicationModal, "System Error"
'pj.ReadOnly = True
'Application.DocClose
'Application.FileCloseAll
'Application.Quit
Else
End If
End If
End If
End If
End If
End Sub