Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy MS Project Data into Excel

Status
Not open for further replies.

f5snopro

Technical User
Feb 6, 2003
23
0
0
US
Hello,

I'm looking to write some code to automatically copy MS Project data into an Excel spreadsheet. I'm doing this so that all I need to do is grab an updated copy of the project and it will update the data and charts in my Excel spreadsheet. Having a bit of a difficult time. This is what I have thus far:

Application.DisplayAlerts = False
FileOpen Name:="File.ppt", ReadOnly:=False, FormatID:="MSProject.MPP"
FileSaveAs Name:="Export.xls", FormatID:="MSProject.XLS5", map:="Task ""Export Table"" map"
FileClose (pjDoNotSave)
Application.DisplayAlerts = True
End Sub

Any insight you could provide would be greatly appreciated!

- Ben
 
I did this a while back. Here is what I did...

FileSaveAs Name:="C:\Outsource.xls", FormatID:="MSProject.XLS5", map:="Resource Task Map"
' Start Microsoft Excel and open an existing Worksheet object.
Set ExcelWorksheet = GetObject("C:\Outsource template.xls")
ExcelWorksheet.Application.Visible = True
ExcelWorksheet.Parent.Windows(1).Visible = True

What happens is, it saves Outsource.xls a temporary file. Then it opens Outsource template.xls. Outsource Template.xls then has macros which imports the outsource.xls file.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top