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 solved the issue of opening the wrong version of MSP Pro. Sub StartMSPPro() Shell "C:\Program Files\Microsoft Office\Office12\winproj.exe /s http://myserver/myinstance" End Sub Not elegant, but works. I guess I was thinking it should be more generic rather than the path being spelled out. Still wondering about the 12.0 object library...hmm. Still do "Quized again" wrote: > 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? > >
Try downloading the PIA Assemblies for Office 12 from Microsoft. Excel 2003 may not play nice with the GAC. -- Stephen Sanderlin Principal Consultant MSProjectExperts For Project Server Consulting: http://www.msprojectexperts.com For Project Server Training: http://www.projectservertraining.com Read my blog at: http://www.projectserverhelp.com/ Join the community at: http://forums.epmfaq.com "Quized again" wrote in message news:B67059FB-0D87-4638-A259-6D5DD1B425F5@microsoft.com: > 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?
Thanks. I had performed a search on "object library" and that did work like a search on PIA, so I appreciate your help. Your help enabled me to find what I sought and it works. BTW I had modified the code to use the path to the global for 12.0 and that worked also. I am not sure how the code would know which "winproj.exe" to use (2003 or 2007). The path idea worked. Anyway You have really helped me because other code I have downloaded needed the 12.0 PIA and I did not have it. Thank you very much. "Stephen Sanderlin" wrote: > Try downloading the PIA Assemblies for Office 12 from Microsoft. Excel > 2003 may not play nice with the GAC. > > -- > > Stephen Sanderlin > > Principal Consultant > > MSProjectExperts > > > > For Project Server Consulting: http://www.msprojectexperts.com > > For Project Server Training: http://www.projectservertraining.com > > > > Read my blog at: http://www.projectserverhelp.com/ > > Join the community at: http://forums.epmfaq.com > > > > > > "Quized again" wrote in message > news:B67059FB-0D87-4638-A259-6D5DD1B425F5@microsoft.com: > > > 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? > >