Consulting

Results 1 to 4 of 4

Thread: How to isolate the table in its own section

  1. #1

    How to isolate the table in its own section

    Hello,
    I have a document with 5 sections. Each section is a particular table that I reference with some Macros. Editing regularly the base document and adding tables above or below the table in question cause me a little problem. I wonder if I can isolate this table in its own section, and then search only that section for the correct table. I'm not sure how to identify the first table in a given section.

    Hope that someone can give me some advice!


    Thanks in advance!
    .

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,236
    Location
    Have you considered giving each table a "name", so as to be able to identify it correctly?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,442
    Location
    You could insert Section breaks either side of that table...

    So, for example, if the table in question is in Section 3 and a new Section break is inserted before it, the table can then be referred to via:
    Activedocument.Sections(4).Range.Tables(1)
    Last edited by macropod; 10-03-2024 at 02:34 AM.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Quote Originally Posted by macropod View Post
    You could insert Section breaks either side of that table...
    Thanks for your suggestion. I got it.

Posting Permissions

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