K
Kris Rockwell
Hello,
I'm not sure if this is the right forum to post to on the subject, but I
thought it may be worth a shot.
I am writing an application in C# that will open PowerPoint, save an
presentation as HTML and then quit. For the most part everything works very
well. However, the PPT application will not quit. The code is listed below
(apologies for readability).
PowerPoint.ApplicationClass oPP = new PowerPoint.ApplicationClass();
oPP.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
PowerPoint.Presentations oPresSet = oPP.Presentations;
PowerPoint._Presentation oPres =
oPresSet.Open(sFullPath,Microsoft.Office.Core.MsoTriState.msoFalse,Micros
ffice.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue);
oPres.SaveAs(sTargetDir+"\\"+sSaveAs,
PowerPoint.PpSaveAsFileType.ppSaveAsHTML,Microsoft.Office.Core.MsoTriState.m
soFalse);
oPres.Close();
oPP.Quit();
oPres = null;
oPP = null;
oPresSet = null;
During a Google search I found that the same problem was occurring for folks
developing an automated process for Excel 2003, but the problem seemed to
disappear with Excel 2000. That leads me to believe that there is something
in PPT 2003 (or Office 2003) that may prevent the application from quitting.
Anyone have any ideas about this?
Thanks,
Kris
I'm not sure if this is the right forum to post to on the subject, but I
thought it may be worth a shot.
I am writing an application in C# that will open PowerPoint, save an
presentation as HTML and then quit. For the most part everything works very
well. However, the PPT application will not quit. The code is listed below
(apologies for readability).
PowerPoint.ApplicationClass oPP = new PowerPoint.ApplicationClass();
oPP.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
PowerPoint.Presentations oPresSet = oPP.Presentations;
PowerPoint._Presentation oPres =
oPresSet.Open(sFullPath,Microsoft.Office.Core.MsoTriState.msoFalse,Micros
ffice.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue);
oPres.SaveAs(sTargetDir+"\\"+sSaveAs,
PowerPoint.PpSaveAsFileType.ppSaveAsHTML,Microsoft.Office.Core.MsoTriState.m
soFalse);
oPres.Close();
oPP.Quit();
oPres = null;
oPP = null;
oPresSet = null;
During a Google search I found that the same problem was occurring for folks
developing an automated process for Excel 2003, but the problem seemed to
disappear with Excel 2000. That leads me to believe that there is something
in PPT 2003 (or Office 2003) that may prevent the application from quitting.
Anyone have any ideas about this?
Thanks,
Kris