How do I get the reason that a word is misspelled

D

DougOliver

I am programmatically checking the spelling in a document
and flagging the errors. The problem is that many times
when I have two words repeated, it is being flagged as a
spelling error. The exact example is in French, and
is "Vous vous en servez pour indiquer ..." (where ... is
just more words continuing. This is perfectly good
French, and shouldn't be flagged. There has to be a way
to get the reason that the word is flagged. If I do the
spellcheck manually, this is flagged as "Repeated word",
so there has to be a way to get the reason that a word is
flagged, but I can't find it.

I am specifically looping through the document, looking at
individual paragraphs, and one of the checks is to look at
the paragraph(i).range.spellingerrors.count, and then
checking every paragraph(i).range.spellingerrors
(j).range.text.

Hopefully, this is clear. Can anybody tell me how to find
the reason a word is rejected?
 
D

dz

Couldn't come up with an answer, but you might try
installing the French dictionary (instructions at the
following link). Then if you wish, tweak the code I found
below (I don't know what dixx is about).

http://support.microsoft.com/default.aspx?scid=kb;EN-
US;309358

Sub FrenchSuggestions()

Dim sug As SpellingSuggestion
Dim dict As String
Dim Msg As String

dict = "French (France)"

For Each sug In GetSpellingSuggestions(Word:="dixx", _
CustomDictionary:="custom.dic", MainDictionary:=dict)
Msg = Msg & sug.Name & vbCrLf
Next

MsgBox Msg

End Sub
 

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