automating Word Thesaurus dialog box

automating Word Thesaurus dialog box

Post by Phil Campbe » Thu, 22 Aug 2002 03:07:12



Hi all,

I am trying to automate the thesaurus functionality in Microsoft Word
without having user input. Basically I am trying to get a list of
synonyms
from Word for any given word.

I am using C# and a reference to Word 2000 (MSWORD9.OLB)

I used Spy++ to get to the class name of the thesaurus dialog box, and
I can
get a valid handle to the thesarus dialog box.  Now I need to get
access to
the Synonyms list box on the dialog box.

In Spy++, the thesaurus dialog box has only three 'children' --
ScrollBar x 2 and a RichEdit20W control.  It can grab the handle for
it, but there are no obvious signs that this is the synonyms listbox.

Can anyone help me figure out how to use SendMessage or any other API
that I
can use to access the list box on the thesaurus dialog box?

--Phil

 
 
 

1. Using MS-Word thesaurus from VB

I am writing a Visual Basic application that needs to use a
dictionary, and thesaurus and if possible a spell checker too.  
I thought that instead of re-inventing the wheel, I would use
the tools available on standards word processors like MS-Word
(sp-am.lex etc., which contain executable code apparently
copyrighted by Houghton-Mifflin).  Most of my users to have
Word anyway, so there should be no copyright issue.  

So, my question for the Net is, is there any way to invoke the
MS-Word tools from a Visual Basic application.  Ideally, I would
like to send a word out to the tool and return the standard Word
thesaurus dialog box.  I expect to do this often during a typical
application session, so any overhead of starting up Word everytime
will render it useless.

I don't know if this matters, but I have Visual Basic 2.0,
Standard Edition.  If it does matter, I am willing to invest in
an upgrade.

Thanks in advance for any help.  E-mail is prefered.

Krishna Prasad

W: 908-234-7072
H: 908-940-2052

2. (win 2000 + mysql) = problem

3. Dialog box from a Dialog Box

4. M99-- Roth IRA Deposit shows as negative - mon_x.gif (0/1)

5. HELP! Dialog Boxes within Dialog Boxes!

6. How do I browse a PC from a PPC?

7. Word 6.0 Dialog boxes

8. .Wanted: Supergen Genlock

9. Dialog box like Word 6.0 options

10. Using SDK dialog boxes from a WLL (Word DLL)

11. Dialog Box from Dialog Box

12. Dialog boxes from dialog boxes?

13. Dialog boxes from Dialog Boxes