none
PowerPoint Slide with C# Specify Slide Layout RRS feed

  • Question

  • Using the sample code linked at the bottom from Microsoft I have the following code after adding a new slide to a presentation:

                // Use the same slide layout as that of the previous slide.
                if (null != lastSlidePart.SlideLayoutPart) {
                    slidePart.AddPart(lastSlidePart.SlideLayoutPart);
                }
    

    It is not working.  The lastSlidePart definitely has the SlideLayoutPart I am looking for with 4 shapes in the shapetree, but the added slide (slidePart) only has 2 shapes in the shapetree.

    I was using the following code as an example:

    http://msdn.microsoft.com/en-us/library/cc850834(v=office.14).aspx

    Wednesday, December 18, 2013 3:53 PM

All replies

  • Hello Gerard,

    It looks like your question is not related to VSTO. I would recommend asking questions related to the Open XML SDK in the corresponding forum thread instead.

    Wednesday, December 18, 2013 7:42 PM
  • Hi,

    When I try to add the multiple shape nodes in the Slide, It works fine. I think maybe there are some error with the shape node.
    Could you show me your code snippets which add the multiple shapes in Slide? Or the shape object was created and coincide in the same location?

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, December 20, 2013 1:53 AM
    Moderator