Office Add-In, getting reference to OLEObject

G

Guest

Hi,

I'm writing an PowerPoint Add-In using C# which adds a toolbar and a button.
When the user clicks the button, an activex control is inserted into the
presentation. Is it possible to somehow type cast the
Microsoft.Office.Interop.PowerPoint.Shape or the shape.OLEFormat.Object to an
instance of the interop-class created for my activex control by visual
studio? I need to do this in order to transfer the state of another activex
control to the control inserted in PowerPoint.

Thank you.
 
C

chanmm

Can you add Shape.OLEfornat as a reference to C#? If can then try to cast
it. If there is no error when build then there you go. If you cannot even
add Shape.OLEfornat as a reference to C# then you know I know.

chanmm
 
G

Guest

Well, after a lot of trial and error, I could cast it to its interface, but
not the generated class. But what I really would like is to insert an
instance of the class into powerpoint, but I guess I'm stuck with
addOLEObject which creates an instance.

Thanks anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top