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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top