Removing SlideMasters using the PowerPoint API

15 Views Asked by At

I am a frontend developer for a company which uses a PowerPoint AddIn where basically are educational exercises of this platform for children and teenagers.

I need help with implementing a code for the elimination of the SlideMaster because every time new slides are loaded for a new exercise (it is not necessary to load another powerpoint document) these SlideMaster are being added and then interfere in exercises (especially those with general styles for normal slides).

I have been consulting this part of the API documentation: https://learn.microsoft.com/en-us/javascript/api/powerpoint/powerpoint.slidemastercollection?view=powerpoint-js-1.5; But I have only managed to get information by importing information such as: iterate over the number of SlideMasters or get their IDS; but it does not help me much since there is no method or function that is "delete" so that I can implement in the code so that every time they load new Slides per exercise, all the SlideMasters are deleted until only 1 is left (for example).

Thanks in advance for the answer and help.

I took the time to do some research on the functions and methods available in the PowerPoint API regarding parent and child components (SlideMasters), some of the ones I worked with were PowerPointApp > Context() > SlideLayout > Slides, but I have not found any option to indirectly remove SlideMasters.

While some functions or methods allow you to modify certain aspects of SlideMasters, such as layout or content, there is no function or method that allows you to directly remove them completely or restore them to a default state.

This begs the question: is it really possible to delete SlideMasters using the PowerPoint API?

0

There are 0 best solutions below