Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-09-2018, 09:01 AM
kilroy kilroy is offline Macro To Delete Specific Carriage Returns Windows 10 Macro To Delete Specific Carriage Returns Office 2016
Competent Performer
 
Join Date: Sep 2016
Location: Southern Ontario
Posts: 122
kilroy is on a distinguished road
Default

Try this

Code:
Sub Replace2returnsWith1()
Selection.WholeStory
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^13{2,}"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
End Sub
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro To Delete Specific Carriage Returns Macro to delete text in specific styles ljd108 Word VBA 14 01-22-2019 01:22 PM
Macro To Delete Specific Carriage Returns Remove Carriage Returns in Address Block Merge field alan100 Mail Merge 5 12-12-2017 08:32 PM
Macro To Delete Specific Carriage Returns Excel VBA macro to copy specific rows and delete it pourmalla Excel Programming 2 04-02-2017 12:09 AM
Macro To Delete Specific Carriage Returns Macro to delete rows not containing specific text Alimou Excel Programming 4 02-06-2017 07:35 AM
Macro To Delete Specific Carriage Returns Run Script to remove carriage returns on certain columns ryanjohnsond@gmail.com Excel Programming 34 09-03-2014 10:43 PM

Other Forums: Access Forums

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