How to programmatically remove duplicated master slides in PowerPoint 2010? RRS feed

  • Question

  • Hi,

    I am writing code to automatically insert many different PowerPoint 2003 ppt files into a PowerPoint 2010 presentation. In order to keep the formatting of 2003 slides, I have to use the following code to keep the source formats. Unfortunately, the following call copy the slide master of each 2003 ppt into the target 2010 ppt. This creates many slide master layouts behind the 2010 presentation file. Of course, there are duplicated slide master layouts. This makes the file extremely big.


    How can I detect duplicated slide master layouts and to delete them?

    Thanks a lot,


    • Moved by Cindy Meister MVPModerator Sunday, May 13, 2012 6:30 AM PowerPoint-specific, not VSTO technology (From:Visual Studio Tools for Office)
    Saturday, May 12, 2012 4:13 PM


  • Hi May,

    Thanks for posting in the MSDN Forum.

    As far as I know that slidemaster will be added when you execute that command. It doesn't regard to PowerPoint version. And I don't think it can be removed.

    have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, May 14, 2012 6:22 AM