Group: microsoft.public.word.vba.general
From: "Graham Mayor"
Date: Saturday, March 08, 2008 4:49 AM
Subject: Re: Spelll check question, Word 2003, Windows XP

You need something like:

Sub SpellSec2()
Dim Sec2 As Range
Set Sec2 = ActiveDocument.Sections(2).Range
With Sec2
.Select
#If VBA6 Then
.NoProofing = False
#End If
.LanguageID = wdEnglishUS
.CheckSpelling
End With
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>




Alan Stancliff wrote:
> In Word 2003, is there a way, with VBA code, to run a spell check on
> just section 2 of a document?
>
> I have been playing with various versions of
> ActiveDocument.sections(2), but somehow, I don't quite seem to be
> able to figure it out.
> Regards,
>
> Alan Stancliff


Safety Articles | Usenet Groups | Usenet News | Bluegrass