I and the sender use two styles.
I wanted a broad space after each set of paragraphs (sender or recipient) and the same broad space after only the last in my series of paragraphs in response.
Code: Select all
Function ParagraphAfter(doc As Document, lngPointsAfter As Long, blnTogether As Boolean)
Dim lng As Long
Dim strStyleOld As String
For lng = doc.Paragraphs.Count - 1 To 1 Step -1
Dim prg As Range
Set prg = ActiveDocument.Paragraphs(lng).Range
With prg
.ParagraphFormat.KeepTogether = blnTogether
If strStyleOld <> .Style Then
strStyleOld = .Style
With .ParagraphFormat
.SpaceAfter = lngPointsAfter
.KeepWithNext = False
End With
Else
End If
End With
Next lng
'Sub TESTParagraphAfter()
' Call ParagraphAfter(ActiveDocument, 48, False)
'End Sub
End Function