Office.js API get selected shapes method for PowerPoint

Office.js API get selected shapes method for PowerPoint



 Nov 17 2021
3 Comments (3 New)


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 data such as `Office.CoercionType`.

In PowerPoint, `ShapeType` is a very important kind of data, I want to modify some selected shapes in slides. Maybe I missed some methods to get the selected shapes in PowerPoint, I would be appreciated if you have any ideas about that. I believe this is also really needed for developers.

Thank you so much in advance!

Copper Contributor

Office.CoercionType.Ooxml is rather convenient in Word to get and set formatted content.
I would love to be able to use it in PowerPoint (and I can think of use cases in Excel too).

Copper Contributor

This is realy needed in order to create a meaningfull productivity add-in. Can the team give an update on this?

Copper Contributor

You can use the 


See the sample 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.