Skip to main content
Known Participant
January 19, 2010
Question

.ItemByID() how to obtain ID

  • January 19, 2010
  • 1 reply
  • 5700 views

Hello,

I have an Indesign document with several text tables.  What I would like to do is have a VBA script enter text into these tables.  I am using the .ItemByID() method.  However, I do not know how to obtain the table ID "x" so that the script knows which table to reference.  When I create the table in Indesign, is there a way to obtain the tables unique ID?

idDoc.TextFrames.ItemByID(x)

Thank you for your help,

Mike

This topic has been closed for replies.

1 reply

Harbs.
Legend
January 19, 2010

Table.id

Harbs

Known Participant
January 19, 2010

Thank you Harbs for helping me out with this, but I'm still not getting it.  If I create a table in my Indesign document, do you mean go to the table menu drop down to get the ID?  I don't see anything there that gives me the ID.  Hate to ask you to elaborate on such a simple task but I'm having trouble with this one.


Thanks again,
Mike

Harbs.
Legend
January 19, 2010

Select the text containing the table and run this:

alert(app.selection[0].tables[0].id)

Harbs