![]() |
|
|
|
#1
|
|||
|
|||
|
Hi, Robinew! The Macropod's code does work on footnotes! I've checked it. Try replacing {1;} with {1,}, just in case. Code:
Sub Del_Spaces_Starting_Paras()
'In selection, delete spaces & unbr spaces starting paragraphs
'including the doc's 1st paragraph.
Dim myRng As range
Application.ScreenUpdating = False
Set myRng = ActiveDocument.StoryRanges(2)
selection.Find.ClearFormatting
selection.Find.Replacement.ClearFormatting
With myRng.Find
.text = "[^32^s]{1;}([!^13]@^13)"
.Replacement.text = "\1"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
Last edited by vivka; 10-24-2023 at 06:17 AM. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Footnote references in the footnote section losing their style when cut+pasted from same doc
|
emblaw | Word | 4 | 12-08-2020 06:23 AM |
Find and Replace/Insert 'CR', delete leading Spaces wherever a user Clicks in a Word document
|
DavidL | Word VBA | 7 | 04-04-2018 12:01 AM |
How to remove trailing & leading spaces in a cell?
|
LearnerExcel | Excel Programming | 8 | 02-04-2018 08:22 PM |
Removing indentations at beginning of paragraphs and replacing with line spaces
|
captainamerica | Word | 2 | 10-27-2017 05:32 PM |
| Get rid of leading spaces before paragraphs | fig000 | Word | 11 | 03-14-2016 01:59 PM |