TexasEx95
asked on
run-time error 5624 on Find/Replace Line
I found this macro code to replace tab spacing with a single space, but I get a run-time 5624 error. The debugger highlights the following line as having the problem:
Selection.Find.Replacement .ClearForm atting
Please help! Getting this macro to run will save me an enormous amount of time!
Selection.Find.Replacement
Please help! Getting this macro to run will save me an enormous amount of time!
Sub TabsOut()
If Selection.Type <> wdNoSelection Then
Selection.HomeKey Unit:=wdStory, Extend:=wdMove
End If
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p^t"
.Replacement.Text = "^p^"
.Forward = True
.Wrap = wdFindContinue
.Format = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER