Search code examples
c#powerpointvstooffice-addinscomaddin

PowerPoint VSTO - how to lock Shapes (manually you would do this in the Selection Pane)?


The following answer explains how to do this in VBA by setting the Locked property on the PowerPoint Shape. However, when trying to do this in C# as a VSTO Addon the Locked property is not available.


Solution

  • The ShapeRange class doesn't expose the Locked property. If that works in VBA then you may try using the late-binding technology to call hidden or private members. Use the Type.InvokeMember method to make such calls in .net applications.