Supress dialog at FileOpen Interop

D

darleyrm

I've written a program to save all my projects from Project Server to
xml document at a batch program. It works just fine.

But now, I'm getting some dialogs during the FileOpen method, as th
view mode replacement suggestion.
The Project stops at this dialog and waits for the user action. Whe
the user confirm/close this dialog, the Project gets back to run

Is there a way to supress all dialogs during the Interop calls?

Follows below an idea of my program


Code
-------------------

// Connecting
Process.Start(Config.PathToProjectApp, "/s " + Config.ProjectWebServer);
activeObject = Marshal.GetActiveObject(Config.ApplicationName);
projectApp = (Application)activeObject;

//Opening
projectApp.FileOpen(projectName, true, PjMergeType.pjDoNotMerge, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, "MSProject.mpd", Type.Missing, PjPoolOpen.pjPoolReadOnly, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

//Saving
//projectApp.FileSaveAs(xmlFullPath, PjFileFormat.pjMPP, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, "MSProject.XML", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

//Closing
projectApp.FileCloseAll(PjSaveType.pjDoNotSave);
projectApp.Quit(PjSaveType.pjDoNotSave);
 
J

JulieS

Hello Darley,

I suggest reposting your question to the
Microsoft.Public.Project.Developer newsgroup. This newsgroup is
focused on working with the Project client. The developer newsgroup
is focused on working with Project through code.

When you repost, please state explicitly what version of Project
Server you are using as it likely will make a difference in reply.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project
 

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

Similar Threads


Top