Skip to main content
Participant
July 17, 2008
Question

[CS3, JS] Problems with TOC

  • July 17, 2008
  • 1 reply
  • 446 views
Hi,

I have generated the TOC by using the following code,

var myTOCStyle = myDocument.tocStyles.add();
var myTOCStyleEntry = myTOCStyle.tocStyleEntries.add("Title1");
myTOCStyleEntry.formatStyle = myHeading1TOCStyle;
myTOCStyleEntry.pageNumberPosition= PageNumberPosition.none;

It normally works, but I want to use a paragraph style inside a paragraphStyleGroup. Anyone knows how to do it?
tocStyleEntries.add() needs a String and I cant find the way to do it.

Thanks in advance,
Jose
This topic has been closed for replies.

1 reply

Participant
March 23, 2013

Just got this to work in ID CS6 - using "Heading:Heading 1" as the text for the name, where "Heading" is the Style Group name and "Heading 1" is the paragraph style name.

Took ages, and lots of guessing (I am very, very new to all this), but works a treat.