Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 10-24-2023, 10:11 AM
vivka vivka is offline Get rid of leading spaces before paragraphs in the footnote section Windows 7 64bit Get rid of leading spaces before paragraphs in the footnote section Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

Code:
Sub Space_Starting_Paras_Del_1()
'In footers, delete spaces, unbr spaces & tabs starting paras.

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^9]{1;}([!^13]@^13)"
        .Replacement.text = "\1"
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchWildcards = True
        .Execute Replace:=wdReplaceAll
        .text = "[^13]{2;}"
        .Replacement.text = ""
        .Execute Replace:=wdReplaceAll
    End With
 Application.ScreenUpdating = True
Set myRng =Nothing
 End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get rid of leading spaces before paragraphs in the footnote section Footnote references in the footnote section losing their style when cut+pasted from same doc emblaw Word 4 12-08-2020 06:23 AM
Get rid of leading spaces before paragraphs in the footnote section 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
Get rid of leading spaces before paragraphs in the footnote section How to remove trailing & leading spaces in a cell? LearnerExcel Excel Programming 8 02-04-2018 08:22 PM
Get rid of leading spaces before paragraphs in the footnote section 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:27 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