Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-21-2018, 08:17 PM
gmayor's Avatar
gmayor gmayor is offline Replace space with paragraph mark Windows 10 Replace space with paragraph mark Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If each line starts with A2 then


Code:
Sub FixReferences1()
Dim oRng As Range
    Set oRng = ActiveDocument.Range
    With oRng.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Replacement.Font.Bold = False
        .Text = " A2"
        .Replacement.Text = "^pA2"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = False
        .Execute Replace:=wdReplaceAll
    End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace space with paragraph mark can't delete paragraph mark at end of document kb Word 10 10-06-2017 02:32 PM
Replace space with paragraph mark Suppress paragraph mark in mail merge field acerview Mail Merge 3 12-22-2015 07:44 PM
Paragraph mark after horizontal line is way to the right. DBlomgren Word 0 02-09-2014 11:42 PM
Replace space with paragraph mark Final paragraph mark Caroline Word 2 02-22-2011 10:39 AM
Adding a paragraph mark by style? Jazz43 Word 0 02-14-2011 06:08 AM

Other Forums: Access Forums

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