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

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