Remove the slide from the presentation

Home Forums PresentationML Remove the slide from the presentation

This topic contains 4 replies, has 2 voices, and was last updated by  selvakumar 8 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2545

    selvakumar
    Participant

    I am trying to remove the slide from the presentation open xml using java script, but when i delete the relationship using the available method, its not work properly, when trying to open the ppt, it throwing the alert “ppt need to repair”, and the slide still exists. How to remove the slide form the presentation,

    Like wise I need to remove the element from the slide. I am waiting for the positive reply.

    #2558

    Eric White
    Keymaster

    The problem here is that you need PresentationBuilder, which can neatly remove a slide from a presentation, but PresentationBuilder is written in C# using the Open-Xml-Sdk, and you need JavaScript.

    The best approach –

    • Take a copy of the presentation before you have deleted the slide you want to remove
    • Take another copy, open in PowerPoint, delete the slide, save
    • Use the Open XML SDK Productivity Tool to compare the two, and make detailed notes on all the changes you need to make.
    • Write your code to make the same changes. Validate your code by comparing with the second copy in the above procedure.

    Are you using the Open-Xml-Sdk for JavaScript?

    Cheers, Eric

    #2561

    selvakumar
    Participant

    Thanks, Yes Eric, I am using the Open-Xml-Sdk for Java script, Is it possible to remove the slide through java script.

    #2562

    Eric White
    Keymaster

    It is certainly possible, but not trivial. You will need to write the code to manipulate the markup, parts, and relationships per my previous answer. Probably is about 30-50 lines of code, so not too bad.

    #2577

    selvakumar
    Participant

    Thanks Eric,
    Could you provide the code means, it will really helpful for me. And also could you suggest me how to insert, add new slide in the presentation through java script.

    Need suggestion for adding and removing the Elements like shape, text, image to and from the slide also helpful.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.