J
Jenny Fletcher
I am trying to delete tabs from a Word doc using the
following code:
Dim objRange as Word.Range
....
With objRange.Find
.ClearFormatting()
.Forward = True
.Replacement.ClearFormatting()
Dim blnReplaced As Boolean = .Execute
(findtext:="^t",ReplaceWith:=String.Empty,
Format:=True,Replace:=Word.WdReplace.wdReplaceAll)
.Execute()
Do While .Found = True
.Execute()
Loop
End With
The problem is that the Tabs are not being removed and I'm
not sure why. When I changed ReplaceWith to "t" to see if
the tabs were being found, it worked.
Can anyone shed any light on this?
Jenny
following code:
Dim objRange as Word.Range
....
With objRange.Find
.ClearFormatting()
.Forward = True
.Replacement.ClearFormatting()
Dim blnReplaced As Boolean = .Execute
(findtext:="^t",ReplaceWith:=String.Empty,
Format:=True,Replace:=Word.WdReplace.wdReplaceAll)
.Execute()
Do While .Found = True
.Execute()
Loop
End With
The problem is that the Tabs are not being removed and I'm
not sure why. When I changed ReplaceWith to "t" to see if
the tabs were being found, it worked.
Can anyone shed any light on this?
Jenny