How to remove loop

I have this macro that increase the paragraph spacing

Sub ParagraphSpaceSelection()
Dim sr As ShapeRange, s As Shape, p As TextRange, l
pct = 10
ic = 1
If ActiveShape.text.IsEditing Then
Set sr = ActiveSelectionRange:
For Each s In sr
If s.Type = cdrTextShape Then
For Each p In s.text.Selection.Paragraphs: l = 0
Select Case p.LineSpacingType
Case cdrPointLineSpacing: l = p.ParaSpacingBefore + inc
Case cdrPercentOfPointSizeLineSpacing: l = p.ParaSpacingBefore + pct
Case cdrPercentOfCharacterHeightLineSpacing: l = p.ParaSpacingBefore + pct
Case cdrMixedLineSpacing: l = p.ParaSpacingBefore
End Select
If Round(l, 3) > 0 Then p.ParaSpacingBefore = l
Exit Sub
Next p 
End If
Next s
End If
End
End Sub

I don't know how I can remove the loop

  • I got it. Here it is...

    Sub ParagraphSpaceSelection()
    Dim sr As ShapeRange, s As Shape, p As TextRange, l
    pct = 10
    ic = 1
    If ActiveShape.text.IsEditing Then
    Set sr = ActiveSelectionRange:
    For Each s In sr
    If s.Type = cdrTextShape Then
    With s.text.Selection
    Select Case .LineSpacingType
    Case cdrPointLineSpacing: l = .ParaSpacingBefore + inc
    Case cdrPercentOfPointSizeLineSpacing: l = .ParaSpacingBefore + pct
    Case cdrPercentOfCharacterHeightLineSpacing: l = .ParaSpacingBefore + pct
    Case cdrMixedLineSpacing: l = .ParaSpacingBefore
    End Select
    If Round(l, 3) > 0 Then .ParaSpacingBefore = l
    End With
    End If
    Next s
    End If
    End
    End Sub