Error when generating PPT

I am generating a PPT file with Visual Studio 2005 RC1. My presentation has 6 slides. I modify these slides programmatically with Aspose and Remove the unused files. I always get the error:

"PowerPoint was unagel to display some of the text, images or obhects on slides in the file, "XXX.ppt", because they have become corrupted. Affected slides have been replaced by blank slides in the presentation and it is not possible to recover the lost information. To ensure that the file can be opened in previous versions of PowerPoint, use the Save As command ( File menu ) and save the file with either the same name or a new name."

If I keed the 6 slides without modifying them, I dont get this error and everything is fine. When I remove 5 of the slides without modifying the 6th one, I get this error. It seems that modifying slides with Aspose causes this. It did work once when I was using Visual Studio 2005 Beta 2.

Do you have any idea of what can cause this?

Giovan Gentile

giovan@ayudasystems.com

Are you sure it’s because of VS 2005 RC1? May be problem in this presentation?

No i'm not sure it is at all. I was just describing my environment. And ya, I forgot, i'm using Microsoft Office PowerPoint 2003.

Did you ever get this problem? What can cause this. I get the error saying that the corrupted slides will be removed but no slides are removed. If I save the File As with another name, i'm able to open it without any problems.

The error I get is when I open the PPT file, I click on Ok and i'm able to view it. I attached the presentation on this post. I have the Template PPT. Since I cannot upload two files, the Result is on the next post.

Here’s the Result PPT

I have another clue for you. Those 6 slides I have are template for my presentation so basically what I do is, when I need one of these template slides, I clone it and modify the cloned slide. At the end of the generation, I delete all of the 6 template slides. This is what causes the error. When I generate it without deleting my template slides( I hide then in then slideshow instead ) , it works fine.

Any news on this problem? I have a simple presentation with 2
slides and my code then goes in and removes one or the other slide
depending upon the scenario. I also am getting the corrupted
presentation error message.

Unfortunately I couldn’t find yet why presentations become corrupted.

If you can send any additional examples it can help greatly.


Unfortunately, I am unable to reproduce this problem with a newly created powerpoint presentation. So I will attach the powerpoint that is causing me problems, hopefully you can find the problem with it.

Code is very simple:

Dim license As New Aspose.PowerPoint.License
license.SetLicense(AsposeLicensePath)

Dim powerPointDocument As New Aspose.PowerPoint.Presentation("C:\temp\TwoSlide.ppt")

Dim slide As Aspose.PowerPoint.Slide = powerPointDocument.Slides(0)
powerPointDocument.Slides.Remove(slide)
powerPointDocument.Write("C:\temp\OneSlide.ppt")