Welcome to OpenXML Developer Sign in | Join | Help

Need help, How do I add a new slide to an existing presentation

Last post 08-12-2008, 11:53 AM by eitanal. 4 replies.
Sort Posts: Previous Next
  •  08-11-2008, 2:58 AM 3553

    Need help, How do I add a new slide to an existing presentation

    Hi,

    I would like to know, how to add a new slide to an existing presentation?
    I noticed the differences between presentation with one/two slides.
    the following "files" were changed:

    [Content_Types].xml    (reference fior the new slide)
    Presentation.xml (reference for the new slide - for this file I know how to get direct access)
    Folder Slides - Need to create a new file - slide2.xml.
    Folder ppt\_rels\presentation.xml.rels - need to add a new reference

    If some one can give me an idea or a link for how to get access and change these files,
    I will realy appreciate it.

    Thanks.

  •  08-11-2008, 10:52 AM 3555 in reply to 3553

    Re: Need help, How do I add a new slide to an existing presentation

    Hi,

    You can use the OpenXml SDK.

                PresentationDocument presDoc = PresentationDocument.Open("ThePathToTheDocument", true);
                PresentationPart presPart = presDoc.AddPresentationPart();
                SlidePart slide = presPart.AddNewPart<SlidePart>();

    Regards
  •  08-12-2008, 9:32 AM 3562 in reply to 3555

    Re: Need help, How do I add a new slide to an existing presentation

    Hi,

    Cant make it to work, by the way, if I have already some slides and I would like to duplicate one, it will not help  because you create it from scratch...

    Please if you can, add an example code, or supply some links...
    I realy need to know how to duplicate a slide.

    Thanks

  •  08-12-2008, 9:52 AM 3563 in reply to 3562

    Re: Need help, How do I add a new slide to an existing presentation

    Hi,

    You will find a lot of "How To" with code sample on Erika Ehrli's blog.
    There's even an "How To duplicate ..."

    Regards
  •  08-12-2008, 11:53 AM 3564 in reply to 3563

    Re: Need help, How do I add a new slide to an existing presentation

    Hi,

    I visited Erika's blog, but most of her "How To" are the "How To" from the MSDN...
    and unfortunately it doesn't helping me...
    Most of the examples are for Word, I need a Presentation slide duplication (pptx)

    If some one can help by sending code or supply links,

    I will realy appreciate it.

    Thanks

View as RSS news feed in XML