embedded objects events

O

Ophelia

Hi, all!
Can anyone help me?
I embed combobox into Word document:

object objClass = "Forms.ComboBox.1";

object shapes = document.GetType().InvokeMember("InlineShapes",
BindingFlags.GetProperty, null, document, null);

object ComboShape = shapes.GetType().InvokeMember("AddOLEControl",
BindingFlags.InvokeMethod, null, shapes, new object[]{objClass,myRange});

Please, tell me, how can I catch GotFocus and LostFocus of this combobox?

If I use UCOMIConnectionPoint interface (and connect to object that is
represented by OLEFormat.Object, to IDispatch), I can catch only Click,
ValueMemberChanged ,etc, but not the Got/Lost Focus events....

What kind of interface I should connect to?
What is the best way to catch events from embedded objects?

P.S.: I use VS2003, C#.
 

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