PDA

View Full Version : How can I determine presence insertion point into some table?



akokin
10-17-2007, 12:39 AM
There is one macro which applies to table in which there is insertion point. If insertion point there not exist (insertion point is there out of table) then we is of error.
How can I determine is there is insertion point into any table or not?
Thank you!

TonyJollans
10-17-2007, 03:29 AM
Couple of ways to do this:


If Selection.Information(wdWithInTable) = True Then
' (assuming selection is an insertion point) you are in a table
End If

' or ..

If Selection.Tables.Count > 0 Then
' (assuming selection is an insertion point) you are in a table
End If