Control Project From Excel
(Sorry if it's posted twice - service seemed to crash
when I hit the Send key) I'm creating a report in Word based on information in Excel and MS Project. Most of the information is contained in Excel so I'm using that as the base for the macros. I can't find any way of opening an MS Project file from Excel. (I have both load on my PC). There is nothing in the OLE Programmatic Identifiers in VB Help on MS Project. I have included the MS Project 9 Object Library in Excel under Tools.References (should it be higher in the priority?) Can anyone point me in the right direction? TIA |
Control Project From Excel
Taras
The priority should not make a difference. Here's a short example of how to open a project file and read the name of the first task. It sounds like you already have the reference set, but if not, set it before you run this macro Sub GetProjectData() Dim prApp As MSProject.Application Set prApp = New MSProject.Application prApp.FileOpen "C:\My Documents\CBSENIOR.mpp" MsgBox prApp.ActiveProject.Tasks(1).Name prApp.FileClose pjDoNotSave prApp.Quit Set prApp = Nothing End Sub -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Taras" wrote in message ... (Sorry if it's posted twice - service seemed to crash when I hit the Send key) I'm creating a report in Word based on information in Excel and MS Project. Most of the information is contained in Excel so I'm using that as the base for the macros. I can't find any way of opening an MS Project file from Excel. (I have both load on my PC). There is nothing in the OLE Programmatic Identifiers in VB Help on MS Project. I have included the MS Project 9 Object Library in Excel under Tools.References (should it be higher in the priority?) Can anyone point me in the right direction? TIA |
Control Project From Excel
Dick,
Thank you - it's what I needed. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 08:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com