Dictionary find

F

fdde

Can somebody please tell me if I can get a true or false returned for a
serach in the dictionary. I need a function like:

IsPresent("Hello")=True
IsPresent("fdhkfhdk")=False

The CheckSpelling brings up the spelling form which I don't need. All I need
is a True if it's present in the dictioanry or False if it isn't.

Any help will be greatly appreciated.

vince
 
J

Jezebel

Check help on the CheckSpelling function. It doesn't normally bring up the
dialog. This works on my machine, anyway --

If not CheckSpelling("dictioanry") then
msgbox "Not in the dictionary..."
end if
 
F

fdde

Thank you. Can you also help me with one more thing. How can I disable the
activespellingdictionary? I would like to look up a word only in the custom
dictionary using this method.
thanks again.
 
J

Jezebel

If you mean from VBA, you can specify the dictionaries as arguments to the
function.
 
F

fdde

Jezebel,

This is my code:
If CheckSpelling(ToFind.Text, maindictionary:="asdfas",
customdictionary:="all.dic") Then MsgBox (ToFind.Text & " was found in the
dic")

Of course, the maindictionary:="asdfas" does not exist. However, I still get
a messagebox on those words that are not in 'all.dic'. My guess is that word
is still using the active spelling dictionary. Can you tell me how I could
disable the use of the active spelling dictionary (assuming my guess is
right) so that I can lookup only those words that are present in the custom
dictionary 'all.dic'.

Thank you.
 
F

fdde

No difference. I can't find anything in the Options to disable the spelling
dictionary either.
 
B

Bob S

No difference. I can't find anything in the Options to disable the spelling
dictionary either.

You don't need the spelling apparatus if all that you want is to see
whether a word is in the custom dictionary. Open the custom dictionary
file and use Find. It's just a text file.

Bob S
 

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