none
Two questions about word automation RRS feed

  • Question

  • I'm new to word automation and I'm using C#. I'm troubled with two problems and I can't find their solutions through internet.

    We know that we can create a new word app by creating a new instance of Word.Application class and then do some automation, but that means the automation is done on a word app created by code, not users. What I want is to get the OLE interface of an existing word app opened up by the users. I have already got the handle of the word app, but how can I get its interface to do the automation?

    Another problem is how we can determine the cursor is in a table or a textbox? The automation I wanna do depends on where the cursor is, like the related toolbar will appear depending on the position of the cursor.

    I would greatly appreciate it if someone could help. Thanks a lot!



    Wednesday, June 22, 2011 3:20 AM

Answers

All replies