I have been working on the following macro to unselect 'NoSpaceBetweenParagraphsOfSameStyle' for all paragraphs (text and footnotes), but the code does not work correctly. Please help! Thanks!
Quote:
Sub NoSpaceBetweenPar()
Dim aRng As Range, iType As Integer
Dim Para As Paragraph
On Error GoTo Leave 'if no footnotes
For iType = 1 To 2
Set aRng = ActiveDocument.StoryRanges(iType) 'wdMainTextStory = 1, wdFootnotesStory = 2
For Each Para In ActiveDocument.Paragraphs
With Para.Range
With Dialogs(wdDialogFormatParagraph)
.NoSpaceBetweenParagraphsOfSameStyle = False
.Execute
End With
End With
Next
Next iType
Leave:
End Sub
|