Working with effects in shapes and textFrames in PowerPoint
We are modernizing our PowerPoint VBA add-in to Office.js. In our VBa add-ins, we have the following functionalities that we would like to implement in Office.js:
- Remove effects: Search for any shape and/or text “effects” such as bevels, glows, gradients, drop shadows, etc. Most effects will simply be removed.
- Find edits: Find any text with a font color changed to something that’s not a default in the template, all non-Arial font types, highlighted text and strikethrough text by looping through all shapes and shapes within shapes.
- Delete strikethrough: Find and delete all strikethrough text, with the exception of that within charts.
We have explored the https://learn.microsoft.com/en-us/javascript/api/powerpoint/powerpoint.textframe?view=powerpoint-js-preview and have found that there is a way to detect whether the contents of a placeholder are strikethrough or not. However, if a portion of the text is strikethrough, it will not be detected. For our use case, we would like to be able to detect all strikethrough even if the strikethrough is only present in some of the text. We would also like to grab and select the strikethrough text and then delete it. Can this be added?
For the first two points, we have not been able to identify a way to achieve them.