PDA

View Full Version : This is a Repeat Post no need to read



samuelimtech
04-08-2014, 01:05 AM
d

mancubus
04-08-2014, 01:19 AM
hi. try this.



Sub FindandReplace()
Dim RNG As Range
Dim Tbl As Table
Dim j As Integer
Dim i As String
Dim k As String

Set Tbl = ActiveDocument.Tables(1)

With Tbl
For j = 2 To .Rows.Count
i = Left(.Cell(j, 1), Len(.Cell(j, 1).Range) - 1)
k = Left(.Cell(j, 2), Len(.Cell(j, 2).Range) - 1)
With ActiveDocument.Content.Find
.ClearFormatting
.Text = i
.Replacement.Text = k
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Next
End With
End Sub

mancubus
04-08-2014, 01:27 AM
:)