Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Active Table (VBA/Word 2000 SP-3)

    Hi,

    Is there a way to actively work on a table after using the Go To command? That is, is there an "active table" property that can be used? In a Word doc, I'm searching for a heading that is always followed by a table. After I find the heading, I go to the table. At that point, I'd like to work with particular columns, rows, and cells. I'd use the Tables collection tools, but with the macro I'm developing, the index number of the subject table would vary.

    Thanks,
    Bob

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Active Table (VBA/Word 2000 SP-3)

    If you can get the insertion point into the table, you can use Selection.Tables(1) to reference it. If there are nested tables it can get messy.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active Table (VBA/Word 2000 SP-3)

    First, you need to find the heading.
    If the table follows, create a table, or range, object that refers to that table and operate on the table via that object.

  4. #4
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active Table (VBA/Word 2000 SP-3)

    The Selection.Tables(1) code helped.

    Thanks,
    Bob

Posting Permissions

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