I'm iterating through the Pgf objects in a flow, and for each one I look for table anchors. I find the table anchor, then what do I do to access its Tbl object and do things with it? I'm just trying to find out if there are any changebars in the table. I don't think using Doc.FirstTblInDoc will help me because I'm starting with a TblAnchor text item.
I run this code on a doc that has only one paragraph with a table anchor in it:
function test() {
doc = app.ActiveDoc;
var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
while ( pgf.ObjectValid() ) {
var textitems = pgf.GetText(Constants.FTI_TblAnchor);
var aa = textitems[0];
Console('what is this: '+aa);
pgf = pgf.NextPgfInFlow;
}
}
This prints "what is this: [object TextItem]".
Seems like I should be able to do something like this to get the Tbl object:
myTable = textitems[0].idata;
Am I warm? Once I get the Tbl object, I'm hoping it's a simple matter of using GetText to get changes, then finding a changebar.
Thanks,
Mark