Copy link to clipboard
Copied
How do I add a 5 row x 3 column table with headers to a document? I have written a little jsx from existing documents but am having issues understanding how to create new objects.
#target framemaker
var doc, textLoc, tbl;
doc = app.ActiveDoc;
textLoc = new TextLoc (doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf, 0);
tbl = doc.NewTable ("Format A", 3, 5, 1, 0, textLoc);
Note that if the table format specified in the first parameter of NewTable doesn't exist in the document, the table will not be created.
Copy link to clipboard
Copied
How do I add a 5 row x 3 column table with headers to a document? I have written a little jsx from existing documents but am having issues understanding how to create new objects.
#target framemaker
var doc, textLoc, tbl;
doc = app.ActiveDoc;
textLoc = new TextLoc (doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf, 0);
tbl = doc.NewTable ("Format A", 3, 5, 1, 0, textLoc);
Note that if the table format specified in the first parameter of NewTable doesn't exist in the document, the table will not be created.
Copy link to clipboard
Copied
#target framemaker
var doc, textLoc, tbl;
doc = app.ActiveDoc;
textLoc = new TextLoc (doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf, 0);
tbl = doc.NewTable ("Format A", 3, 5, 1, 0, textLoc);
Note that if the table format specified in the first parameter of NewTable doesn't exist in the document, the table will not be created.