As mehmetcik indicates, there is no 'Continue For' in Word VBA.
It's not clear what you're trying to achieve, but perhaps the following macros will give you some pointers. The first one bolds the found text wherever it is found in a table. The second one bolds it only if it's in column 2 in a table.
Sub Demo1()
Application.ScreenUpdating = False
Dim Tbl As Table
For Each Tbl In ActiveDocument.Tables
With Tbl.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "Text to Find"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindStop
.Format = True
.Replacement.Font.Bold = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
Next Tbl
Set Tbl = Nothing
Application.ScreenUpdating = True
End Sub
Sub Demo2()
Application.ScreenUpdating = False
Dim Tbl As Table
For Each Tbl In ActiveDocument.Tables
With Tbl.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "Text to Find"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Do While .Find.Found
If .InRange(Tbl.Range) Then
If .Cells(1).ColumnIndex = 2 Then .Duplicate.Font.Bold = True
Else: Exit Do
End If
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Next Tbl
Application.ScreenUpdating = True
End Sub
Bookmarks