Help! I import XML with multiple tables. I don’t want the tables. I only want the text and I want that text formatted to a certain paragraph style.
I am new to scripting and I’m struggling to understand it. Google helped me find scripts for table to text. I added to the script to format the text to the paragraph style. The script works, but with an error message. I would like to use the script without the error message. (Now, the script isn’t working at all!)
Here’s the script:
var myDoc=app.activeDocument;
tableList = myDoc.textFrames.everyItem().tables.everyItem();
tableList.convertToText(“”,”\r”);
var myText = myTextFrame.parentStory.characters.everyItem();
myText.appliedParagraphStyle = myDoc.paragraphStyles.item(“[Price Section]”);
Here’s the error message:
error 30476
the requested action could not be completed because the object no longer exists
engine: main
(script location)
Line: 3
Source: tableList.convertToText(“”,”\r”);