determine if in table

N

Nkiefer

Is it possible to know if the text i selected is in a table? I am using vba
to search for a word. When i find the word I need to know if the word is
within a table or not.
 
J

Jay Freedman

Nkiefer said:
Is it possible to know if the text i selected is in a table? I am
using vba to search for a word. When i find the word I need to know
if the word is within a table or not.

If Selection.Information(wdWithinTable) Then
' it's in a table
Else
' it isn't
End If

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Top