D
Darley
I've written a program to save all my projects from Project Server to a xml
document at a batch program. It works just fine.
But now, I'm getting some dialogs during the FileOpen method, as the view
mode replacement suggestion.
The Project stops at this dialog and waits for the user action. When the
user confirm/close this dialog, the Project gets back to run
Is there a way to supress all dialogs during the Interop calls?
I'm using vs2008, in a machine with MSProject 2003 connecting to a Project
Server 2003
Follows below an idea of my program:
// 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);
Thanks,
document at a batch program. It works just fine.
But now, I'm getting some dialogs during the FileOpen method, as the view
mode replacement suggestion.
The Project stops at this dialog and waits for the user action. When the
user confirm/close this dialog, the Project gets back to run
Is there a way to supress all dialogs during the Interop calls?
I'm using vs2008, in a machine with MSProject 2003 connecting to a Project
Server 2003
Follows below an idea of my program:
// 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);
Thanks,