TOC parameter


TOC parameter
Hi Genius,
Could anyone help how to save the TOC parameter in the variable that already defined in the active document.
My request need to save the parameters for the following entries:
1. Entry Style
2. Page Number
3. Between Entry and Number
4. etc....
Trying coding is below:
//Working fine
var myTocStyle = app.activeDocument.tocStyles.item(-1).name;
alert("myTocStyle: " + myTocStyle)   
var myTitleStyle = app.activeDocument.tocStyles.item(-1);
alert("myTitleStyle: " + myTitleStyle)  
//Not working
var myFormatStyle =;
alert("myFormatStyle: " + myFormatStyle)
var myPageNumber = app.activeDocument.tocStyleEntries.pageNumberPosition;
alert("myPageNumber: " + myPageNumber)
var mySeperator = app.activeDocument.tocStyleEntries.separator;
alert("mySeperator: " + mySeperator)
Please help for my urgent request.
Hi Jump,
Thanks for your immediate response...
I tried your code, but it not works for me, may I did mistake, please clear my code
var myTocStyle = app.activeDocument.tocStyles.item(-1).name;
alert("myTocStyle: " + myTocStyle)
//~ var myPageNumber = myTocStyle.tocStyleEntries.itemByName("FM_H1").pageNumberPosition;   //Jump_Over Code
//~ var myPageNumber = myTocStyle.tocStyleEntries.item(0);
alert("myPageNumber: " + myPageNumber)
//~ var myEntryStyle = myTocStyle.tocStyleEntries.item(0);
var myEntryStyle =;
alert("myEntryStyle: " + myEntryStyle)
Output that I need is:
As per my attachment, in above line (alert for myEntryStyle) should be "FM_H1" style. Then i got the output.
Thanks in advance
Read More: The other 6 answers