A
asadhussain
I am trying to automate conversion of powerpoint files to html. I have
developed this as an ASP .NET web page.
The problem is that once in a while i get a presentation that asks me
to save the changes as revisions and pops up a dialog. Now since this
is an ASP .NET app, there is noone there to click yes or no and the
application just hangs.
I searched online and found out that application.EndReview() needs to
be called to end the review process. Apparently, this does not solve
the problem. Is there a way to disable this review process or even
detect it. I am ok with not processing presentations in the review
process.
Any suggestions?? I have attached my code below.
....
PowerPoint.Application ppApp = new PowerPoint.Application();
PowerPoint.Presentation prsPres =
ppApp.Presentations.Open(targetFile,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse);
string testStr = prsPres.Name;
string fileHTM = filePath.Replace(".ppt", ".html");
try
{
prsPres.EndReview();
}
catch (Exception ex)
{
}
prsPres.SaveCopyAs(fileHTM, PowerPoint.PpSaveAsFileType.ppSaveAsHTML,
Microsoft.Office.Core.MsoTriState.msoTrue);
prsPres.Close();
ppApp.Quit();
....
developed this as an ASP .NET web page.
The problem is that once in a while i get a presentation that asks me
to save the changes as revisions and pops up a dialog. Now since this
is an ASP .NET app, there is noone there to click yes or no and the
application just hangs.
I searched online and found out that application.EndReview() needs to
be called to end the review process. Apparently, this does not solve
the problem. Is there a way to disable this review process or even
detect it. I am ok with not processing presentations in the review
process.
Any suggestions?? I have attached my code below.
....
PowerPoint.Application ppApp = new PowerPoint.Application();
PowerPoint.Presentation prsPres =
ppApp.Presentations.Open(targetFile,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse);
string testStr = prsPres.Name;
string fileHTM = filePath.Replace(".ppt", ".html");
try
{
prsPres.EndReview();
}
catch (Exception ex)
{
}
prsPres.SaveCopyAs(fileHTM, PowerPoint.PpSaveAsFileType.ppSaveAsHTML,
Microsoft.Office.Core.MsoTriState.msoTrue);
prsPres.Close();
ppApp.Quit();
....