Error while text extracting from a textFrame.
hi All,
I have been trying to extract text from a textframe as rtf format but I receive error while running it. The error is "The specified object does not support the desired export format". I tried with pdf and idml format and they worked well.
Any help or hint is appreciated.
var myDoc = app.activeDocument;
var myFrame = myDoc.textFrames.itemByName("India");
var myFile1 = new File(myDoc.filePath + "/" + "india.rtf"); // error on this line
var myFile2 = new File(myDoc.filePath + "/" + "india.pdf");
var myFile3 = new File(myDoc.filePath + "/" + "india.idml");
myFrame.exportFile(ExportFormat.RTF, myFile1);
myFrame.exportFile(ExportFormat.PDF_TYPE, myFile2);
myFrame.exportFile(ExportFormat.INDESIGN_MARKUP, myFile3);
alert("done");
