View Single Post
 
Old 11-12-2021, 04:44 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
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

Hmmm.
The following works with your document
Code:
Sub Macro32()
Dim oRng As Range, oDup As Range

    Set oRng = Selection.Range
    Set oDup = Selection.Range
    With oRng.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = "^t"
        .Forward = True
        .Wrap = wdFindStop
        .MatchWildcards = False
        Do While .Execute
            If oRng.InRange(Selection.Range) Then
                oRng.Text = ""
            End If
            oRng.Collapse 0
        Loop
    End With
    
    Set oRng = oDup.Duplicate
    With oRng.Find
        .Text = "="
        Do While .Execute
            If oRng.InRange(oDup) Then
                oRng.Text = vbTab & oRng.Text
            End If
            oRng.Collapse 0
        Loop
    End With
    Set oRng = Nothing
    Set oDup = Nothing
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