Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-05-2023, 07:42 AM
RobiNew RobiNew is offline Remove spaces before each paragraph mark in text and footnotes Windows 10 Remove spaces before each paragraph mark in text and footnotes Office 2016
Competent Performer
Remove spaces before each paragraph mark in text and footnotes
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Question Remove spaces before each paragraph mark in text and footnotes


The following code does its job, but is there a more efficient way to obtain the same result? Thanks!



Code:
Dim oRng As Range
Dim iType As Integer
  For iType = 1 To 2
Set oRng = ActiveDocument.StoryRanges(iType)
  With oRng.Find
    .ClearFormatting
    .Text = " ^p"
    While .Execute
      oRng.Characters.First.Delete
      oRng.Collapse wdCollapseEnd
    Wend
  End With
    Next iType
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove spaces before each paragraph mark in text and footnotes How to remove gap between text and footnotes on Mac? gemmajackson7 Word 1 05-16-2021 07:26 AM
Remove spaces before each paragraph mark in text and footnotes How to Remove trailing spaces AND line breaks in a block of text JulianS96 Word 4 02-04-2020 04:20 AM
Remove spaces before each paragraph mark in text and footnotes Remove Paragraph / Spaces sharina1985 Mail Merge 1 10-05-2019 03:52 AM
big spaces appearing automatically in certain parts of the text - how to remove them pratodifuoco Word 2 05-26-2017 12:55 PM
editing text and remove spaces romanticbiro Word VBA 5 07-04-2014 07:42 PM

Other Forums: Access Forums

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