View Single Post
 
Old 07-30-2018, 12:40 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,143
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

Set a range to the selection and process the paragraphs in the range e.g.
Code:
Sub Macro2()
Dim oPara As Paragraph
Dim oRng As Range, oSel As Range
    Set oSel = Selection.Range
    For Each oPara In oSel.Paragraphs
        If oPara.Style Like "List*" Then
            Set oRng = oPara.Range
            oRng.Collapse 1
            oRng.MoveEndUntil Chr(32)
            oRng.End = oRng.End + 1
            oRng.Text = ""
        End If
    Next oPara
lbl_Exit:
    Set oPara = Nothing
    Set oRng = Nothing
    Set oSel = 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