You are reading a single comment by @aggi and its replies. Click here to read the full conversation.
  • I can't work out how to select a table in VBA in Word (the document has multiple tables)

    Can you give a bit more detail - how do you know which table(s) you want to select, functionally speaking? Not just the one at the text cursor/in the selection?

  • It's a few tables in a template. The ActiveDocument.Tables(1).Select seems to work with a bit of trial and error identifying which table I want.

  • Won't that just target the first (second if zero-based, I forget) table in the doc?
    That's fine if you'll always want to target the first table. But a more robust solution would tag the table uniquely within the template. When I did something like this I think I used a combination of field codes and plain text identifiers e.g [DISCLAIMER_GOES_HERE], the latter more obvious to non-savvy Word users.

About

Avatar for aggi @aggi started