Highlighted

Newbie Question #2: Creating Tables

Community Beginner ,
Jul 17, 2019

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.

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

#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.

TOPICS
Scripting

Views

108

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Newbie Question #2: Creating Tables

Community Beginner ,
Jul 17, 2019

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.

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

#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.

TOPICS
Scripting

Views

109

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 17, 2019 0
Adobe Community Professional ,
Jul 17, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2019 2