![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
||||
|
||||
![]()
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 |
#3
|
|||
|
|||
![]()
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.
|
#4
|
||||
|
||||
![]()
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 |
#5
|
||||
|
||||
![]()
Why are you applying brute-force formatting instead of using a suitable paragraph Style?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
There is a standard built-in paragraph style that does exactly this: No Spacing
|
#7
|
|||
|
|||
![]()
Thank you all for your responses.
|
![]() |
|
![]() |
||||
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 |
![]() |
CoventryKid | Word | 2 | 03-09-2021 11:22 PM |
![]() |
cbuck1 | Word | 1 | 05-17-2020 09:04 PM |
![]() |
Talullah | Word | 2 | 05-01-2012 12:32 PM |
spacing within paragraph | psmoore | Word | 1 | 06-22-2010 02:15 AM |