Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2025, 09:19 AM
thankyou thankyou is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 11 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2016
Novice
Paragraph Format -I want no spacing before/after, but this is not working for me.
 
Join Date: Jun 2025
Posts: 3
thankyou is on a distinguished road
Default Paragraph Format -I want no spacing before/after, but this is not working for me.

Sub ParaNoSpace()


'
' keyboard Alt+p

With Selection.ParagraphFormat
.LeftIndent = InchesToPoints(0)
.RightIndent = InchesToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 0
.SpaceAfterAuto = False


End With
End Sub

Thank you for your suggestions

Last edited by thankyou; 06-19-2025 at 09:25 AM. Reason: version is Office 365
Reply With Quote
  #2  
Old 06-19-2025, 09:34 AM
gmayor's Avatar
gmayor gmayor is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 10 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
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

It works OK if you select the paragraph(s) you wish to process.
__________________
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
  #3  
Old 06-19-2025, 09:37 AM
thankyou thankyou is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 11 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2016
Novice
Paragraph Format -I want no spacing before/after, but this is not working for me.
 
Join Date: Jun 2025
Posts: 3
thankyou is on a distinguished road
Default

Yes, I know you have to select the paras. That's what my problem is--I select them but the macro doesn't work for me.
Reply With Quote
  #4  
Old 06-19-2025, 05:36 PM
Guessed's Avatar
Guessed Guessed is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 10 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

We can't see what you have selected. Your code doesn't impact the paragraphs before or after the selection so if you only selected a single paragraph then the code could have zero impact on what you see on screen.

There could be complicating factors like borders, table cell spacing or frames depending on what you selected
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 06-19-2025, 07:47 PM
macropod's Avatar
macropod macropod is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 10 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Why are you applying brute-force formatting instead of using a suitable paragraph Style?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old Yesterday, 04:44 AM
Italophile Italophile is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 11 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2021
Expert
 
Join Date: Mar 2022
Posts: 542
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

There is a standard built-in paragraph style that does exactly this: No Spacing
Reply With Quote
  #7  
Old Yesterday, 01:50 PM
thankyou thankyou is offline Paragraph Format -I want no spacing before/after, but this is not working for me. Windows 11 Paragraph Format -I want no spacing before/after, but this is not working for me. Office 2016
Novice
Paragraph Format -I want no spacing before/after, but this is not working for me.
 
Join Date: Jun 2025
Posts: 3
thankyou is on a distinguished road
Default

Thank you all for your responses.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste in picture, wrap with line, format paragraph before and picture...close to working ctviggen Word VBA 3 03-25-2023 08:49 AM
Paragraph Format -I want no spacing before/after, but this is not working for me. Spacing before and after Paragraph CoventryKid Word 2 03-09-2021 11:22 PM
Paragraph Format -I want no spacing before/after, but this is not working for me. Style spacing not working after move from Word 2010 to 2019 - Spacing Before at top of page cbuck1 Word 1 05-17-2020 09:04 PM
Paragraph Format -I want no spacing before/after, but this is not working for me. Paragraph spacing Talullah Word 2 05-01-2012 12:32 PM
spacing within paragraph psmoore Word 1 06-22-2010 02:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:28 AM.


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