Highlighted

How to set/change the paragraph tags of a generatable file?

New Here ,
Oct 11, 2017

Copy link to clipboard

Copied

I have a Table of Contents and need to be able to set the included paragraph format tags for it using a script.

If I set the tags manually using the Set Up Table of Contents option, update the book and print Class BookComponent's ExtractTags property (BookComponent.ExtractTags) it shows the list of tags but I cant modify this property. Is there any way to do this?

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

Here is a snippet of code that should help you:

#target framemaker

var book = app.ActiveBook;

var tocName = book.Name.replace (/\.book$/i, "TOC.fm");

var bookComp = book.NewSeriesBookComponent (0);

bookComp.BookComponentType = Constants.FV_BK_TOC;

bookComp.Name = tocName;

var extractTags = bookComp.ExtractTags;

extractTags.push ("doctitle");

bookComp.ExtractTags = extractTags;

bookComp.GenerateInclude = 1;

TOPICS
Scripting

Views

147

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

How to set/change the paragraph tags of a generatable file?

New Here ,
Oct 11, 2017

Copy link to clipboard

Copied

I have a Table of Contents and need to be able to set the included paragraph format tags for it using a script.

If I set the tags manually using the Set Up Table of Contents option, update the book and print Class BookComponent's ExtractTags property (BookComponent.ExtractTags) it shows the list of tags but I cant modify this property. Is there any way to do this?

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

Here is a snippet of code that should help you:

#target framemaker

var book = app.ActiveBook;

var tocName = book.Name.replace (/\.book$/i, "TOC.fm");

var bookComp = book.NewSeriesBookComponent (0);

bookComp.BookComponentType = Constants.FV_BK_TOC;

bookComp.Name = tocName;

var extractTags = bookComp.ExtractTags;

extractTags.push ("doctitle");

bookComp.ExtractTags = extractTags;

bookComp.GenerateInclude = 1;

TOPICS
Scripting

Views

148

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
Oct 11, 2017 0
Adobe Community Professional ,
Oct 11, 2017

Copy link to clipboard

Copied

Here is a snippet of code that should help you:

#target framemaker

var book = app.ActiveBook;

var tocName = book.Name.replace (/\.book$/i, "TOC.fm");

var bookComp = book.NewSeriesBookComponent (0);

bookComp.BookComponentType = Constants.FV_BK_TOC;

bookComp.Name = tocName;

var extractTags = bookComp.ExtractTags;

extractTags.push ("doctitle");

bookComp.ExtractTags = extractTags;

bookComp.GenerateInclude = 1;

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...
Oct 11, 2017 0