Juzhan
Nov 17, 2021Brass Contributor
Status:
New
Office.js API get selected shapes method for PowerPoint
Hello!
In the current version, we can get selected data in PowerPoint/Excel/Word using `Office.context.document.getSelectedDataAsync`. However, this method can only work for some specific types of ...
FromTheArctic
Aug 22, 2023Copper Contributor
You can use the
context.presentation.getSelectedShapes();
See the sample https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-set-shapes.yaml for more details.
I got confused by this too as intuitively getting selected shapes sounds like it belongs in the getSelectedData method. Hope this helps.