I finally got the document to export by taking out the small amount of Chinese text and outlining those characters instead. I think the export was being hindered by the huge size of the font. But for this document, which is nearly 800 pages long, I still can’t get the script to put the numbers in the correct style sheet and color, even after doing removing all the Line Numbers styles and layers and also doing a “save as” to IDML before trying again. They always comeout in “Basic Style” in black. I did also make a new 1 page test document from scratch and LineNumbers behaves correctly here, so I guess there is something in the file that is impeding Line Numbers. I also tried just putting line numbers in one frame to see if maybe the whole long document was creating problems, but the same thing happens. Then I copied and pasted that single page into a brand new document, and there LineNumbers worked correctly. My workaround for my long document, finally, was to create a character style and run it on the “Basic Style,” which wasn’t used anywhere else in the document except in LineNumbers.