![]() |
#4
|
||||
|
||||
![]()
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 |
Tags |
find |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do you use the find and replace tool to find dates and times in Excel 2013? | Jules90 | Excel | 3 | 04-14-2020 07:40 PM |
In Find and Replace, can Word stop after each Replace? | wardw | Word | 1 | 06-08-2017 02:47 PM |
![]() |
Hoxton118 | Word VBA | 7 | 06-10-2014 05:05 AM |
![]() |
paulkaye | Word | 4 | 12-06-2011 11:05 PM |
Automatic find replace after selection in dropdown | vsempoux | Word | 0 | 10-28-2009 08:45 AM |