Consulting

Results 1 to 2 of 2

Thread: How can I determine presence insertion point into some table?

  1. #1
    VBAX Regular
    Joined
    Aug 2007
    Posts
    66
    Location

    How can I determine presence insertion point into some table?

    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!

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Couple of ways to do this:

    [VBA]
    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
    [/VBA]
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •