@handifem – you have to use a string.
So, options b or c could be right.
Is the paragraph style nested in a paragraph style group?
Then none of the proposed options will work.
The syntax for nested paragraph styles would be:
Build a TOC Style without scripting InDesign and ask for the names of all entries of all toc styles of the document:
I always create TOC frame
I would like to assign to the first page
not on the current page
var myDoc = app.activeDocument;
var a = myDoc.createTOC(item, true); //current page
var a = myDoc.createTOC(myDoc.pages.item(0), true); //??? how do first page
Move it to the first page with method move() on the text frame.
command of the head portion
Go to first page command can be written
Check the documentation. There are six arguments of the method createTOC().
Those you want to leave out and are described as optional should be defined as undefined.
The argument placePoint does not support a page, but two entries written as an array for x and y position.
Maybe placePoint could be written in the coordinates of the whole document, but it's much easier to move the text frame by method move() on the text frame.