none
Creating a new slide from a Master Slide/layout with SmartArt gives error RRS feed

  • Question

  • Hi,

    I've reated a Master Slide with several layouts, a couple of which contain some smart art objects. Using the code from http://codingthedocument.wordpress.com/2010/03/24/creating-new-presentations-using-the-slide-master/ I was able to add new slides based off the various layouts.

    Everything works fine for the slides that are based off layouts that do not contain any SmartArt objects but for the slides that do, I get corrupted slides. I figure it's because the smartart objects are stored in the various DiagramParts.

    I added code to iterate through the various Diagram classes copying the various Diagram objects, eg.

    foreach (DiagramDataPart dp in slPart.DiagramDataPart)
    {
     DiagramDataPart newDataPart= sPart.AddPart<DiagramDataPart>(dp,
     slPart.GetIdOfPart(dp));
     newDataPart.FeedData(dp.GetStream());
    }

    but theresult slide is still corrupted.

    Does anyone now how I can successfully create a new slide from a layout with a SmartArt object?

    Thanks,
    Rich 

    Wednesday, March 14, 2012 3:36 AM

Answers

  • Hello Rich,

    I don't reproduce your issue using a slide master with a single SmartArt object. In order to make my slide master fail I shall need to start with a VS project similar to yours. Is it an Add-in or a console app? Are you using PowerPoint 2010 or PowerPoint 2007?

    Do you see the same issue when you have saved your Slide Master as the only slide in a PowerPoint template (.potx) and then built a new presentation (.pptx) attached to that template totally through the user interface? If you don't see the problem please save your presentation, then append the new extention .zip to the name, unzip that file and examine the xml in the parts of the file. Use that as the base against which you compare the xml in the corrupt file.

    If your manually-built presentation also has the corruption please describe your slide master with respect to the SmartArt it contains, the specific SmartArt image(s), the text in the SmartArt pieces, the other parts of the slide master, the number of slides in the presentation at the time you learn that the file is corrupt, and anything else to help identify the factors contributing to the issue you have.
    Regards,
    Chris Jensen
    Senior Technical Support Lead


    Chris Jensen

    • Proposed as answer by Bruce Song Thursday, March 22, 2012 2:34 AM
    • Marked as answer by Bruce Song Monday, April 2, 2012 6:45 AM
    Monday, March 19, 2012 8:23 PM
    Moderator

All replies

  • Hi Rich,
    Thank you for posting. 
    I will help you involve others to help you. There might be some delay about the response. Appreciate your patience.
    Best Regards,

    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, March 16, 2012 10:33 AM
  • Hello Rich,

    I don't reproduce your issue using a slide master with a single SmartArt object. In order to make my slide master fail I shall need to start with a VS project similar to yours. Is it an Add-in or a console app? Are you using PowerPoint 2010 or PowerPoint 2007?

    Do you see the same issue when you have saved your Slide Master as the only slide in a PowerPoint template (.potx) and then built a new presentation (.pptx) attached to that template totally through the user interface? If you don't see the problem please save your presentation, then append the new extention .zip to the name, unzip that file and examine the xml in the parts of the file. Use that as the base against which you compare the xml in the corrupt file.

    If your manually-built presentation also has the corruption please describe your slide master with respect to the SmartArt it contains, the specific SmartArt image(s), the text in the SmartArt pieces, the other parts of the slide master, the number of slides in the presentation at the time you learn that the file is corrupt, and anything else to help identify the factors contributing to the issue you have.
    Regards,
    Chris Jensen
    Senior Technical Support Lead


    Chris Jensen

    • Proposed as answer by Bruce Song Thursday, March 22, 2012 2:34 AM
    • Marked as answer by Bruce Song Monday, April 2, 2012 6:45 AM
    Monday, March 19, 2012 8:23 PM
    Moderator