How to exclude comments from spell-checking

H

hans.list

I want to exclude all comments from being spell-checked. This is what I came up with:

Sub ExcludeCommentsFromSpellChecking()
Dim commentaar As Comment

For Each commentaar In ActiveDocument.Comments

commentaar.Range.Select
Selection.LanguageID = wdNoProofing
Next commentaar
End Sub

I'd be grateful for better solutions than this one ...

Hans
 
S

Stefan Blom

Modify the Comment Text and Balloon Text styles so that they are set to "Do
not check spelling or grammar." (For each of the styles, in the Modify Style
dialog box, click Format, Language.)

Which version of Word are you using, by the way?
 
S

Stefan Blom

In code, you'd need something like this:

ActivedDocument.Styles("Comment Text") _
..LanguageID = wdNoProofing

and the corresponding code for Balloon Text, of course.
 
S

Stefan Blom

Correction:

ActiveDocument.Styles("Comment Text") _
..LanguageID = wdNoProofing
 
H

hans.list

Modify the Comment Text and Balloon Text styles so that they are set to "Do

not check spelling or grammar." (For each of the styles, in the Modify Style

dialog box, click Format, Language.)

Thanks, Stefan!
Which version of Word are you using, by the way?


Word:mac 2011. Your macro works there too :).

Cheers,

Hans
 

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