SpellCheck Macro causes dialog buttons to freeze 
Author Message
 SpellCheck Macro causes dialog buttons to freeze

I've written this macro to replace the standard spell checker so that
protected sections within a document are not checked.  The problem is
that this Macro causes problems within the Spelling Dialog box.  When
using the Mouse to click the Ignore or Change Buttons, I see that it
accepted the Mouse down command, but the it doesn't recognize the
mouse up and hangs until you move the mouse or click the button again.

I either need to find out why the buttons are freezing and not
recognizing all my mouse commands, or find a different way to call
spell check that doesn't cause this problem.

Here is my Macro

Sub Spelling1()
   dim x as Word.Section

   For each x In Word.ActiveDocument.Sections
      IF not x.ProtectedForForms then
         x.Range.CheckSpelling
      End If
   Next

End Sub

IF I take out all the code for the protected sections and just do
Word.ActiveDocument.Range.CheckSpelling the buttons freeze as well.

Any thoughts?

Thanks
Jared Swoboda



Tue, 20 Sep 2005 04:12:15 GMT  
 SpellCheck Macro causes dialog buttons to freeze
Hi Jared,

See the article "How to enable the spellchecker in a protected document" at:

http://www.mvps.org/word/FAQs/MacrosVBA/SpellcheckProtectDoc.htm

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP

Quote:
> I've written this macro to replace the standard spell checker so that
> protected sections within a document are not checked.  The problem is
> that this Macro causes problems within the Spelling Dialog box.  When
> using the Mouse to click the Ignore or Change Buttons, I see that it
> accepted the Mouse down command, but the it doesn't recognize the
> mouse up and hangs until you move the mouse or click the button again.

> I either need to find out why the buttons are freezing and not
> recognizing all my mouse commands, or find a different way to call
> spell check that doesn't cause this problem.

> Here is my Macro

> Sub Spelling1()
>    dim x as Word.Section

>    For each x In Word.ActiveDocument.Sections
>       IF not x.ProtectedForForms then
>          x.Range.CheckSpelling
>       End If
>    Next

> End Sub

> IF I take out all the code for the protected sections and just do
> Word.ActiveDocument.Range.CheckSpelling the buttons freeze as well.

> Any thoughts?

> Thanks
> Jared Swoboda



Thu, 22 Sep 2005 09:01:33 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. X button use causes program freeze - Need help please

2. X button use on secondary form causes program freeze

3. Word 97 Freezes when MouseOver macro button

4. Word 8.0 OLB SpellCheck - GetSpellingSuggestions causes OLE Automation error

5. Macro spellcheck not picking up misspelled words

6. Curious behaviour of spellcheck dialog box

7. Spellcheck Locked Form Fill-in with Macro

8. Word spellchecking - howto make dialog box visible

9. opening Multiple documents cause the word to freeze

10. VB6 causes system to freeze

11. VB6 causes system to freeze

12. Why does Automation cause OS to freeze

 

 
Powered by phpBB® Forum Software