Trying to Export All Document Stories to RTF via Scripting
Hi Experts,
Im trying to export all document stories to RTF File, it shouid be simple task but the following script only export one story not all the stories, can you please help to identify the problem? and thanks a lot in advance :
var myDoc = app.activeDocument
var mystories = myDoc.stories.everyItem();
var nfolder1 = "~/Desktop";
var fName = "myFile";
var nFile=new File("~/Desktop/myFile.rtf");
mystories.exportFile(ExportFormat.RTF, nFile);
alert("Exporting Document to RTF Done!");
if (nFile.exists)
nFile.execute();

