I’ve decided to create a visualizer for Visual Studio, which helps to work with COM objects while debugging. Therefore this article will describe a way to identify supported by COM object interfaces.
Background
Below is an example of code which finds a shape in Excel and casts it to TextBox, a control of Office.Forms:
using Microsoft.Office.Interop.Excel;
using TextBox=Microsoft.Vbe.Interop.Forms.TextBox;
...
Shape shape = sheet.Shapes.Item("ctool");
OLEObject oleObject = (OLEObject) shape.OLEFormat.Object;
TextBox TextBox = (TextBox) oleObject.Object;
...
Read more: Codeproject