Help in bypassing dialog box

H

hlngus

Is there a way to programmatically suppress the following dialog box
that appears
after spellchecking, i.e. "Word finished checking the selection. Do
you want to continue checking the remainder of the document? " .

I'd also settle for a 'No' selection that is transparent to the user.

Here's the code snippet.

' If document is protected, Unprotect it.
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If

' Set the language for the document.
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
Selection.NoProofing = False

Selection.Text = UserForm1.TextBox1.Value

' Perform Spelling/Grammar check.

If Options.CheckGrammarWithSpelling = True Then
ActiveDocument.CheckGrammar
Else
ActiveDocument.CheckSpelling IgnoreUppercase:=False, _
customdictionary:="c:\ams\devprod\word\city.dic"
' SendKeys "n"
End If

Selection.WholeStory
Selection.Cut

UserForm1.TextBox1.SetFocus

UserForm1.TextBox1.Text = " "
UserForm1.TextBox1.Paste

Appreciate any input here.
 

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