Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
Sub Search_Table() Dim ht As Single Dim strLen As Integer Dim rng As Range Dim strFind As String 'The index number of the tables that have the string 'Single Products' have to be listed in a MsgBox at the End strFind = "Single Products" strLen = Len(strFind) Set rng = ActiveDocument.Range With rng .Find.ClearFormatting With .Find .Text = strFind .Execute End With Do If .Find.Found Then If rng.Information(wdWithInTable) Then MsgBox "String has been found" End If End If If Not .Find.Found Then MsgBox "String has not been found" End If rng.MoveStart strLen .Find.Execute Loop Until Not (.Find.Found) End With End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.