Detect from COM addin that automation client has connected to Word

T

tartancli

Hi,
I will be connecting an automation client to Word 2003 using
System.Runtime.InteropServices.Marshal.BindToMoniker. However, what i'm
wondering is if there is a way that I may determine from my COM Add-in,
loaded in Word, that this event has happened (ie. in COM Add-in determine
what (or how many) processes are connected to Word). Thank you in advance.
 
P

pavan

Hey,
You can do that actually. In your OnConnection method, the last
argument that is passed, the custom array, can help you in doing this.
The third (which is the last) param tells you if the host app is being
opened through automation

Hope this helps
Regards,
Pavan
 
T

tartancli

Hi Pavan,

Thanks very much for the reply. I can see that this will work well in the
case where the Word application is being started from the automation client,
but I don't think that it will work in the case where the automation client
attaches to a running instance of Word. Is this correct ?
 

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