Add To Dictionary

S

Shakil Khan

Hi,

I have provided Spell Check feature in my application through Word
Automation. I haven't used the standard Spell Check Dialog provided byMS
Word, Instead I created my own custom Dialog. But I don't know How to
provide "Add To Dictionary" option, Is their any method exposed in Word
Object Model that allow you to add new words in default dictionay?

Regards,
Shakil
 
M

M. Homayon

In MS Word, whenever you right click on a word which is red waved underlined,
you will see the option "Add to dictionary". By clicking it, Automatically
the word is added to the custom dictionary.

Mohammad Homayon.
 
C

Cindy M -WordMVP-

Hi Shakil,
I have provided Spell Check feature in my application through Word
Automation. I haven't used the standard Spell Check Dialog provided byMS
Word, Instead I created my own custom Dialog. But I don't know How to
provide "Add To Dictionary" option, Is their any method exposed in Word
Object Model that allow you to add new words in default dictionay?
I've never been able to find one...

but CustomDictionaries are plain text files, so you should be able to open
the plain text file and add the term.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
T

Tony Jollans

It depends on how you're working. If the selection is in a word which Word
considers a spelling error (not a valid word and not previously flagged to
Ignore), then you can do ...

CommandBars("Spelling").Controls("Add to Dictionary").Execute

(but this will fail if the word under the cursor is not in the
SpellingErrors collection)
 
C

Cindy M -WordMVP-

Hi Tony,

Ah, yes, I'm going to have to remember that one :)
It depends on how you're working. If the selection is in a word which Word
considers a spelling error (not a valid word and not previously flagged to
Ignore), then you can do ...

CommandBars("Spelling").Controls("Add to Dictionary").Execute

(but this will fail if the word under the cursor is not in the
SpellingErrors collection)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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