Re: Powerpoint crashes when try to save ppt-file

  •  11-17-2005, 7:29 AM

    Re: Powerpoint crashes when try to save ppt-file


    I have the task of continuing Carstens work at our company. Right now we are having problems upon opening the generated ppt files. The presentation themselves seem fine but we still get the following message when we open the file:

    "PowerPoint was unable to display some of the text, images, or objects on slides in the file, "<result.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 or a new name."

    I have isolated the problem to the following block of code in the function SavePresentation():

        for (int i=num_templateSlides+1; i>0; i--)
         if (m_pres.SlidesIdea [I].SlidePosition != 0)

    If I skip this block of code, the generated ppt can be opened without any problem. But then unwanted slides from the template.ppt remain in the resulting ppt, which is not desirable.

    I don't understand why removing any of the slides from the template slide causes such a an error message when opening the resulting ppt. Please help.



    PS: attaching source template, result template and code


View Complete Thread