Missing red squigglies when automating WORD.

R

Rick Pingry

Hi,

I am using Word Automation with MFC. Things are going well, except that I
noticed that when I open up a document or create a new document, misspelled
words are not being underlined with the red squigglies (technical term). I
have looked at all of the options and they seem to be correct. If I open
WORD up directly, the red squigglies show with misspelled words, but not in
the instance of WORD that I open. IF I type a new word I know is misspelled,
like "asdfsadf ", I still do not see the red squiggly.

I noticed that I could hit F7 and the Spelling and Grammar dialog would
show, and my red squigglies would then show. I tried calling
document.CheckSpelling(), and that worked as well, except if there WAS a
misspelled word in the doc, the Spelling and Grammar dialog will also show
up, hidden by another window which makes my app appear to hang. I don't
really want the dialog to show at all, I just want my red squigglies to work.
I have also tried getting the SpellingErrors collection and tried using the
SpellingChecked and ShowSpellingErrors flags to no avail.

There seems to be a global application state set somewhere, because if I
open up any external instances of WORD while mine is still running, the same
thing happens, but if I close my instance and open up another external
instance, it seems to work properly as before.

Thanks for any help
-- Rick
 
D

Doug Robbins - Word MVP

Is the Option for Check spelling as you type turned on?

Options.CheckSpellingAsYouType = True

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
R

Rick

Is the Option for Check spelling as you type turned on?

Options.CheckSpellingAsYouType = True

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

Thanks for the ideas,

I was able to work out my problem, but it was not related to setting
any of the flags, they all seemed to be ok.
1. In Word 2002, this seems to be just the way things work, perhaps a
bug that was fixed in later versions of Word.
2. I had a timer in my AxControl that was checking for Word's saved
state and whether or not the active document is MY document.
Apparently, having these checks so often messed up Word's ability to
do the spell checking, but also to pop up little help boxes, like the
ones that show the author when track changes mode is on.

So I hope this helps anyone else out there working on the problem.
Beware of timers that query Word, they may throw off some of Word's
functionality.

Thanks
-- Rick
 

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