I'm trying to target a table of contents object that is generated by inDesign's createTOC function. I am successfully generating the object, but I can not set any kind of identifier properties like tocTF.name = "myToc"
When I examine it in the Data Browser it is being identified as an [object Story] but without any properties except for length. I was also able to find it as a textFrame in it's containing layer when I was trying to troubleshoot in the console.
Function in Use
tocTF = doc.createTOC(tocStyle, true, undefined, [margins[1]+"px", margins[0]+"px"], true, tocFolder);
Data Browser
Console
doc.layers.item(tocFolderName).textFrames.length Result: 1 doc.layers.item(tocFolderName).textFrames.item(0).id Result: 447428 doc.layers.item(tocFolderName).textFrames.item(0).name Result:
Although it's returning an ID number, I cannot use this for my purposes.