View Single Post
  #3   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Vickie S. Evans
 
Posts: n/a
Default Word 2003: Applying a character style to the first sentence of every paragraph.

Greg,

Thanks for your response. I'm interested in the second option... apply the
"First Sentence" style globally to the first sentence every paragraph. I'll
test the code and let you know how it turns out.

Thanks again!
Vickie

I just want the first sentence of every paragraph to be styled with the
First Sentence style without having to manually apply it to each and every
one

"Greg" wrote in message
oups.com...
Vickie do you mean "globally" as in apply it to every bit of the text
in the document? If so, just select all (CTRL+a) and apply the style.

Do you mean apply the "First Sentence" style globally to the first
sentence every paragraph? Then perhaps something along these lines
will do:

Sub Scratchmacro2()
Dim oPar As Paragraph
Dim oRng As Word.Range
For Each oPar In ActiveDocument.Range.Paragraphs
oPar.Range.Sentences(1).Select
With Selection
.MoveEndUntil Cset:="n", Count:=wdBackward
.Style = "First Sentence"
End With
Next oPar
End Sub