Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-27-2023, 09:40 AM
RobiNew RobiNew is offline Paragraph Dialog: No Space Between Paragraphs of Same Style Windows 10 Paragraph Dialog: No Space Between Paragraphs of Same Style Office 2016
Competent Performer
Paragraph Dialog: No Space Between Paragraphs of Same Style
 
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
 

Tags
dialog, paragraphs, space



Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraph Dialog: No Space Between Paragraphs of Same Style Remove extra space before a paragraph and return it to previous paragraph laith93 Word VBA 7 04-27-2022 08:26 AM
a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection drrr Word VBA 2 08-24-2021 03:05 AM
Paragraph Dialog: No Space Between Paragraphs of Same Style In 2010 document set for no space between paragraphs, but getting large space. normancamp Word 10 12-25-2017 04:54 PM
"Don't add space between paragraphs of the same style" within tables WordUser789 Word Tables 3 12-17-2017 05:02 PM
Allowing space between paragraphs of same style jjmclell Word VBA 4 04-02-2015 06:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft