Log in

View Full Version : Automating the MSProject Import Wizard



jncunliffe
03-28-2012, 03:26 AM
Hi Everyone,

I've developed an Excel spreadsheet that helps create repetitive groups of tasks for importing into Project. The spreadsheet works well but every time I want to import its output into Project I have to go through the Import Wizard. Is there a way to automate this import process into Project e.g. call the wizard through, vba, from within Excel?

Thanks,

Jon C

LLScheduler
02-24-2013, 08:19 AM
Did you ever figure this out? I am working on the same thing right now.

I have the code for opening the Excel file - that part works.

I need it to use the open file vs. creating a new file. I assume I need to use some something + ActiveProject, but it's not working at the moment.

Next, I assume I have to define every column from Excel to Project?

And, yes, I know the Wizard is there - that would be my first choice, but that's not what is being requested.

'Open the file in Excel
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
ExcelPath = xlApp.GetOpenFileName(FileFilter:="*.xl*,*.xl*", _
Title:="Find Excel Workbook")
If Dir(ExcelPath) = "" Then
MsgBox "File not found, macro ended", vbCritical
End
End If
xlApp.Visible = False
xlApp.Workbooks.Open ExcelPath
'Use the Start date of Task1 for the new Project's initial Start Date
Application.FileNew