Copy link to clipboard
Copied
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();
Check out the 'ExportAllStories.jsx' in the \Scripts Panel\Samples\JavaScript folder:
It makes a separate text file for each story.
Here's a script that puts them on a page-by-page basis into a single file. It was made for CS3 but still works in 2022.
Hope it helps!
— Kas
Copy link to clipboard
Copied
You need Text Exporter from Rorohiko:
Copy link to clipboard
Copied
Thanks a lot @Derek Cross but i just want to do it by script
Copy link to clipboard
Copied
Click the link that Derek posted and you'll see this statement:
"TextExporter 4 can export all the stories of an InDesign document into a single file."
It is a script.
Copy link to clipboard
Copied
@Peter Kahrel Thanks a lot
Copy link to clipboard
Copied
@Peter Kahrel But Version 4 is Extension!/Plugin , and with this way i will not be able to continue my script developing, unlucky this is not what i was seeking for!, please advice me?
Copy link to clipboard
Copied
Check out the 'ExportAllStories.jsx' in the \Scripts Panel\Samples\JavaScript folder:
It makes a separate text file for each story.
Here's a script that puts them on a page-by-page basis into a single file. It was made for CS3 but still works in 2022.
Hope it helps!
— Kas
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I am trying to get this script to work in 2024. I am getting errors. Does anyone know how to make it work in newer versions?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Tag the script author's name: @Kasyan Servetsky
Copy link to clipboard
Copied
Something went wrong when you extracted jsx file from the zip package - the line with the error should be like this:
myStory = myPage.textFrames[t].parentStory;
[t] is missing.
You should try to extract it again.
Copy link to clipboard
Copied