Hi,
Hopefully it's allowed to post this here...
I have a routine in Excel that finds MS Project files in turn, then aims to open each one, copy its task data and pick up some file attributes, and paste them into the original Excel file. This has been working fine until I updated one of the Project files.
Now, when the code opens the Project file, an 'Import Wizard' appears, halting the Excel code; the Wizard has no value to the procedure, it only interrupts it. Clicking 'Cancel' on the Wizard causes the Project file to close, and the Excel code then fails as it doesn't have an object.
The relevant code is below, and all searches for 'MS Project disable import wizard' and similar have failed to turn anything up. Any ideas out there as to how to turn off the wizard or circumvent the issue?
Thanks
Sub ExportProjectToExcel1(strPath As String, strFile As String)
Dim appProject As MSProject.Application
Dim projPlan As MSProject.Project
'Launch project and open plan file
Set appProject = New MSProject.Application
appProject.DisplayAlerts = False
appProject.Visible = True
appProject.FileOpenEx (strPath & "\" & strFile)
'At this point I can watch the Project file open
'and can see its task data, but then it disappears
'and is replaced with the Import Wizard
Set projPlan = appProject.ActiveProject 'Code fails here with error 424 - Object required
End Sub
I should add that if I open the Project file manually, the Wizard doesn't launch and I can see the file just fine.