Is there a way to go through each paragraph in word document and bold the first and last sentences?
Thanks in advance!
E
Is there a way to go through each paragraph in word document and bold the first and last sentences?
Thanks in advance!
E
[vba]Sub FirstLastBold()
Dim oSentence As Word.Sentences
Dim oPara As Word.Paragraph
For Each oPara In ActiveDocument.Range.Paragraphs()
Set oSentence = oPara.Range.Sentences
oSentence(1).Font.Bold = True
oSentence.Last.Font.Bold = True
Set oSentence = Nothing
Next
End Sub[/vba]
will bold the first and last sentences of each paragraph.
Works like a charm! Thanks for the quick help.
eripple