Powerpoint automation question

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();
....
 
G

Guest

uh why can't you just do this as a Windows Application?

you're not supposed to try to run office automation tasks unless a user is
present to handle problems

i have seen some PPT XML cheat-- i think that it was thru sourceforge (where
you can write PPT in XML format)
 

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