View Single Post
 
Old 09-27-2023, 09:40 AM
RobiNew RobiNew is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Question Paragraph Dialog: No Space Between Paragraphs of Same Style

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
Reply With Quote