Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-08-2022, 04:53 AM
gmayor's Avatar
gmayor gmayor is offline Help please, Script to Delete Paragraph marks b4 Tables Windows 10 Help please, Script to Delete Paragraph marks b4 Tables Office 2019
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

Try the following
Code:
Sub Macro1()
Dim oRng As Range
    Set oRng = Selection.Range
    With oRng.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        Do While .Execute(findText:=Chr(13))
            If oRng.Information(wdWithInTable) = False Then
                If oRng.InRange(Selection.Range) = False Then GoTo lbl_Exit
                oRng.Text = ""
            End If
        Loop
    End With
lbl_Exit:
    Set oRng = Nothing
    Exit Sub
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
 

Tags
delete paragraph marks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection drrr Word VBA 2 08-24-2021 03:05 AM
Help please, Script to Delete Paragraph marks b4 Tables How to delete all the punctuation marks from a paragraph? Jamal NUMAN Word 3 02-26-2019 02:33 PM
Help please, Script to Delete Paragraph marks b4 Tables Paragraph marks appear suddently leonardevens Word 1 07-13-2015 12:14 PM
Finding Paragraph Marks BZee Word 4 02-14-2015 02:12 PM
Help please, Script to Delete Paragraph marks b4 Tables Replace paragraph-marks (line-breaks) in tables with a character-string Aztec Word VBA 2 04-02-2013 10:52 PM

Other Forums: Access Forums

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