View Single Post
 
Old 02-15-2015, 06:34 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Manual formatting, like that you propose, simply perpetuates the problem. Create (or modify) a paragraph style to provide you with the spacing you want and apply it to the paragraphs.

The following will kill the two birds with one stone, by creating a suitable style in the document (if the name doesn't exist) to apply 36 points of space before each item.

Code:
Sub Macro1()
Dim oStyle As Style
Dim bStyle As Boolean
Dim oPara As Paragraph
    For Each oStyle In ActiveDocument.Styles
        If oStyle.NameLocal = "Extra Space" Then
            bStyle = True
            Exit For
        End If
    Next oStyle
    If Not bStyle Then
        ActiveDocument.Styles.Add name:="Extra Space", _
                                  Type:=wdStyleTypeParagraph
        With ActiveDocument.Styles("Extra Space")
            .AutomaticallyUpdate = False
            .ParagraphFormat.SpaceBefore = 36
            .NoSpaceBetweenParagraphsOfSameStyle = False
        End With
    End If
    For Each oPara In ActiveDocument.Paragraphs
        If oPara.Range.Text Like "Choice (*" Then
            oPara.Style = "Extra Space"
        End If
    Next oPara
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote