Late binding of COM events (Word)

S

Sune Keller

Hi,

I'm currently developing a C# project using late binding to integrate with
different versions of Word. I'm calling methods and properties like this:

object documents = wordApplication.GetType().InvokeMember("Documents",
BindingFlags.GetProperty, null, wordApplication, null);

object wordDocument = documents.GetType().InvokeMember( "Open",
BindingFlags.InvokeMethod, null, documents, new object[12] { filename,
....... } );

My problem is that do want do do som stuff using Word's Quit event, but I
dont know how to do this using late binding? Can anyone provide me with some
sample code?

Kind Regards,
Sune
 
J

Jonathan West

I think it is the nature of late binding that you can't get events from a
late-bound object.
 

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