Q
Quized again
MOPS2007 system. First explanation then questions.
I have tried to use some Excel VBA code I found in the postings but it does
not run. It seems to need the MSP 12.0 object library. I checked the
Tools>References in my Excel (which is 2003) and the MSProject 12.0 object
library is not listed.
I tried to add it so I browsed to c:\windows\assembly and selected
"Microsoft.Office.Interop.MSProject" version 12.0 and nothing happens when I
try to add it. THe browse window just resets itself to the first files in
that assembly directory. If I rt-click I have the option to uninstall it.
Ok, so we rewrote the code to this and it is trying to launch MOPS2003, not
2007.
Sub Test2()
'Requires Reference to Microsoft Project
Dim projApp As MSProject.Application
'
On Error Resume Next
'Uses Windows Authentication as no username or password parameters added
Shell "winproj.exe /s http://my_servername_here/instance_name_here"
Do Until Not (projApp Is Nothing)
DoEvents
Set projApp = GetObject(, "MSProject.Application")
Loop
Debug.Print projApp.Name
Debug.Print projApp.Profiles.ActiveProfile.ConnectionState
projApp.Quit
Set projApp = Nothing
End Sub
Questions are.
1. Shouldn't I already have the 12.0 object library available for selection
in the Excel references if I am using MSP Pro 12.0?
2. How do I get MSP 12.0 object library to show in the Excel 2003 references?
3. Is there some code snip to add so that MSP2007 Pro launches instead of
MSP Pro 2003?
I have tried to use some Excel VBA code I found in the postings but it does
not run. It seems to need the MSP 12.0 object library. I checked the
Tools>References in my Excel (which is 2003) and the MSProject 12.0 object
library is not listed.
I tried to add it so I browsed to c:\windows\assembly and selected
"Microsoft.Office.Interop.MSProject" version 12.0 and nothing happens when I
try to add it. THe browse window just resets itself to the first files in
that assembly directory. If I rt-click I have the option to uninstall it.
Ok, so we rewrote the code to this and it is trying to launch MOPS2003, not
2007.
Sub Test2()
'Requires Reference to Microsoft Project
Dim projApp As MSProject.Application
'
On Error Resume Next
'Uses Windows Authentication as no username or password parameters added
Shell "winproj.exe /s http://my_servername_here/instance_name_here"
Do Until Not (projApp Is Nothing)
DoEvents
Set projApp = GetObject(, "MSProject.Application")
Loop
Debug.Print projApp.Name
Debug.Print projApp.Profiles.ActiveProfile.ConnectionState
projApp.Quit
Set projApp = Nothing
End Sub
Questions are.
1. Shouldn't I already have the 12.0 object library available for selection
in the Excel references if I am using MSP Pro 12.0?
2. How do I get MSP 12.0 object library to show in the Excel 2003 references?
3. Is there some code snip to add so that MSP2007 Pro launches instead of
MSP Pro 2003?