Open up MSP file remotely and save as MDB, then close without prompt

A

Andibevan

I am trying to open a MS Project file from Excel, save it as an MDB (MS
Access) and then close the MS Projec file - all without any prompts:-

Here is what I have so far:-

Set oMSProject = CreateObject("MSProject.Application")
oMSProject.Visible = True
oMSProject.Application.DisplayAlerts = False
oMSProject.FileOpen Name:="C:\Documents\Meetings\SMV Team Meeting\Go-Live
Dependancies V34.mpp", ReadOnly:=True, FormatID:="MSProject.MPP"
oMSProject.FileSaveAs Name:="<C:\Documents\Meetings\SMV Team Meeting\Go-Live
Dependancies V34_Convert.mdb>", _
FormatID:="MSProject.MDB8", Backup:=False, ReadOnly:=False,
TaskInformation:=True _
, Filtered:=False

oMSProject.Application.DisplayAlerts = True


oMSProject.Application.DisplayAlerts = True
oMSProject.Quit
'oMSProject = Nothing

If I use this Macro, the file opens but it does not actually save the file
which I find wierd.

If I remove TaskInformation:=True and Filtered:=Falsethe file asks to be
prompted but does actually save. Any more good ideas on how I stop seeing
the prompts?

TIA

Andi
 
R

Rod Gill

I don't see a project title being saved. In a database, each project needs a
title, apart from the filename. Record a macro of you saving a project to
your database, then try using that code in your save as.
 
A

Andibevan

Fantastic - That worked a treat :-

oMSProject.FileSaveAs Name:= _
"<C:\Documents\Temp\ExportDatabase.mdb>\MyProject", _
FormatID:="MSProject.MDB8"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top