I have tried to update toc by script. Everythings goes well, except it always pickups full paragraph text.
I want to exclude auto number from paragraph text.
The script is below:
var sty = doc.tocStyles.firstItem();
sty.numberedParagraphs = NumberedParagraphsOptions.EXCLUDE_NUMBERS;
Manually update TOC by InDesign works well but by script is not.
With ExtendScript Toolkit, I had tried to debug and check the value of sty.numberedParagraphs it is EXCLUDE_NUMBERS.
But when execute "createTOC", it always pickups full paragraph text (with auto number).
Did I miss something?
The "Make text anchor in source paragraph" shows the same behaviour: works fine when a TOC is done manually, but doesn't work when the TOC is created by a script. Please log a bug against the problem you describe (Feature Request/Bug Report Form).
Thank you !
I had already reported the bug at your link.
Hope Adobe will correct this bug soon.