Script for exporting all stories to one RTF file

Hi, I've been searching for this as I know it's been asked before, but I haven't had any luck finding it yet: Wasn't there a script that someone developed which would allow you to export all stories from an InDesign document into a single RTF file? Or is that wishful thinking....
Thanks, Phyllis

http://www.kahrel.plus.com/indesign/batch_convert_cs3.html
Kasyan

Similar Messages

  • Script for export all text in single rtf file?

    Hi!
    I need to export all storys from indd document to a single rtf file. Is there avaible some free script for CS4 which can do that?

    if(app.documents.length != 0){
         if(app.documents.item(0).stories.length != 0){
              myGetFileName(app.documents.item(0).name);
    //========================= FUNCTIONS ===========================
    function myGetFileName(myDocumentName){
         var myFilePath = File.saveDialog("Save Exported File As:");
         if(myFilePath != null){
              myDisplayDialog(myDocumentName, myFilePath);
    function myDisplayDialog(myDocumentName, myFilePath){
         //Need to get export format, story separator.
         var myExportFormats = ["Text Only", "Tagged Text", "RTF"];
         var myDialog = app.dialogs.add({name:"ExportAllStories"});
         with(myDialog.dialogColumns.add()){
              with(dialogRows.add()){
                   with(dialogColumns.add()){
                        var myExportFormatDropdown = dropdowns.add({stringList:myExportFormats, selectedIndex:0});
              with(dialogRows.add()){
                   var myAddSeparatorCheckbox = checkboxControls.add({staticLabel:"Add separator line", checkedState:true});
         var myResult = myDialog.show();
         if(myResult == true){
              var myExportFormat = myExportFormats[myExportFormatDropdown.selectedIndex];
              var myAddSeparator = myAddSeparatorCheckbox.checkedState;
              myDialog.destroy();
              myExportAllText(myDocumentName, myFilePath, myExportFormat, myAddSeparator);
         else{
              myDialog.destroy();
    function myExportAllText(myDocumentName, myFilePath, myExportFormat, myAddSeparator){
         var myPage, myStory;
         var myExportedStories = [];
         var myTempFolder = Folder.temp;
         var myTempFile = File(myTempFolder + "/tempTextFile.txt");
         var myNewDocument = app.documents.add();
         var myDocument = app.documents.item(myDocumentName);
         var myTextFrame = myNewDocument.pages.item(0).textFrames.add({geometricBounds:myGetBounds(myNewDocument, myNewDocument.pages.item(0))});
         var myNewStory = myTextFrame.parentStory;
         for (var i = 0; i < myDocument.pages.length; i++) {
              myPage = myDocument.pages.item(i);
              for (var t = 0; t < myPage.textFrames.length; t++){
                   myStory = myPage.textFrames[t].parentStory;
                   if (!IsInArray(myStory.id, myExportedStories)) {
                        //Export the story as tagged text.
                        myStory.exportFile(ExportFormat.taggedText, myTempFile);
                        myExportedStories.push(myStory.id);
                        //Import (place) the file at the end of the temporary story.
                        myNewStory.insertionPoints.item(-1).place(myTempFile);
                        //If the imported text did not end with a return, enter a return
                        //to keep the stories from running together.
                        if(i != myDocument.stories.length -1){
                             if(myNewStory.characters.item(-1).contents != "\r"){
                                  myNewStory.insertionPoints.item(-1).contents = "\r";
                             if(myAddSeparator == true){
                                  myNewStory.insertionPoints.item(-1).contents = "----------------------------------------\r";
                   } // if not exported
              } // for text frames
         } // for pages
         switch(myExportFormat){
              case "Text Only":
                   myFormat = ExportFormat.textType;
                   myExtension = ".txt"
                   break;
              case "RTF":
                   myFormat = ExportFormat.RTF;
                   myExtension = ".rtf"
                   break;
              case "Tagged Text":
                   myFormat = ExportFormat.taggedText;
                   myExtension = ".txt"
                   break;
         myNewStory.exportFile(myFormat, File(myFilePath));
         myNewDocument.close(SaveOptions.no);
         myTempFile.remove();
    function myGetBounds(myDocument, myPage){
         var myPageWidth = myDocument.documentPreferences.pageWidth;
         var myPageHeight = myDocument.documentPreferences.pageHeight
         if(myPage.side == PageSideOptions.leftHand){
              var myX2 = myPage.marginPreferences.left;
              var myX1 = myPage.marginPreferences.right;
         else{
              var myX1 = myPage.marginPreferences.left;
              var myX2 = myPage.marginPreferences.right;
         var myY1 = myPage.marginPreferences.top;
         var myX2 = myPageWidth - myX2;
         var myY2 = myPageHeight - myPage.marginPreferences.bottom;
         return [myY1, myX1, myY2, myX2];
    function IsInArray(myString, myArray) {
         for (x in myArray) {
              if (myString == myArray[x]) {
                   return true;
         return false;
    This is a revised version of the script --  not totally tested.
    Kasyan

  • Export all stories w/ abbreviated tags?

    I'm attempting to export all stories (using the .js script) in my new copy of CS4 and it is not giving me the option of selecting abbreviated versus verbose tags for the .txt files. I am pretty sure this option used to be included in earlier scripts. How can I get it to export using abbreviated tags? The default seems to be verbose, which is not useful for our purposes.

    Thanks to share this excellent functionality ;-)))
    Just added a single line at the end of your code :
    CLIENT_HOST('CMD /C START "Grid" excel.exe ' || LC$Filename ) ;
    and everything is fine !

  • Script for export in datapump  -- help needed !!!

    hello all,
    i am using the following script as batch file in my database for export
    script:
    =========
    exp name/password file=d:\exp\%date%.dmp full=y log=d:\exp\exp.log an this will replace the first file(monday) on next monday.
    similar way i need a script for data pump for full database export using datapump
    thanks ,
    gold

    login to database as a dba and create directory for your dumpfile path.
    create directory dpump_dir as 'd:\exp';
    and then use the below script for export.
    expdp username/password full=y directory=dpump_dir dumpfile=%date%.dmp logfile=exp.log

  • Shell script for export backup in oracle 11g

    Hi,
    Oracle version 11.2.0..
    O/S-AIX
    How to write shell script for export full backup in oracle 11g and also need to remove 2 days of old backup.
    Regards,
    Raju

    How to write shell script for export full backup in oracle 11g
    Do you mean that export is your backup strategy ? is your database running in noarchivelog mode ? if so, then why ? if not so, then why not RMAN ?
    need to remove 2 days of old backup.
    If that mean remove files older than 2 days, you can use something like this :
    $ find <absolute directory path> -mtime +2 -exec rm {} \;

  • I am trying to change the order of one of my audiobooks (media kind: audiobook), but the ID tags are greyed out.  I can't change tags for almost all my audiobooks.  Music files OK. Files are all read/write. Repaired disc perms. OS 10.9.4. ITunes11.4

    I am trying to change the order of one of my audiobooks (media kind: audiobook), but the ID tags are greyed out.  I can't change tags for almost all my audiobooks.  Music files OK. Files are all read/write. Repaired disc perms. OS 10.9.4. ITunes 11.4  I don't have iTunes Match.

    Select all the songs and then Advanced -> Convert ID3 tags.
    http://docs.info.apple.com/article.html?path=iTunesWin/6.0/en/655win.html

  • Scripts for Exporting Master/Work Rep

    Hi,
    I want to automate the export process and in turn was looking for any scripts for exporting the whole ODI Work/Master Rep. I checked the CLASS objects and we donot have any CLASS names for Repository exports.
    Thanks in advance for any answers..!

    Created for 10g [ http://odiexperts.com/automize-the-backup-using-odi-exports]
    but should work for 11g too :)

  • Best Settings for Exporting DVD Footage in a Movie File

    Hello,
    I've been trying to find the best settings for exporting DVD footage into a movie file from Adobe Premiere CS6.
    I recently have been using my Magnavox DVD recorder for recording VHS tapes that I made long ago for shows and various other things, and no matter what, my footage doesn't come out as it needs to be.
    Here's an example of what I did recently with my own settings:
    http://www.youtube.com/watch?v=qFV4sT7rHGs
    I'm not expecting HD footage, I know these are tapes, but I'm playing the raw footage on my Xbox 360, and it looks better than this. I had to directly use the VOB files on the DVD for this, as trying to rip the files into an AVI or any other format with a DVD ripper didn't do anything, in fact it degraded the quality and made the audio not play in Premiere.
    So what would be some good settings for exporting a sequence with DVD footage that is from a VHS into a movie file, preferably one that wouldn't degrade the quality?
    Thanks!

    First, read Why not edit mpeg http://tangentsoft.net/video/mpeg/edit.html to get a general idea of why a VOB makes a very poor source file (which is a renamed MPG, with some other stuff like menu screens)
    Also, Read Bill Hunt on editing a VOB/MPG file http://forums.adobe.com/thread/464549
    Once you have a DVD compliant VOB on your timeline, and understanding that a standalone DVD recorder sometimes plays fast-n-loose with "compliance" per the DVD specification, about all you can do is export to standard or widescreen DV AVI and accept the fact that re-encoding an already compressed file is just not going to give great results

  • Hello i need a help about script to export translatable text strings from ai files and import them back

    Hello i need a help about script to export translatable text strings from ai files and import them back after editing, thanks in advance

    Lanny -
    Thank you for taking the time to help with this problem. Can I just say however that as someone who has posted a first comment here and quite clearly never used a forum like this before, your comment unfortunately comes across as very excluding. It makes me feel there are a set of unwritten rules that I should know, and that I don't know them shows that the forum is not for me. In short, it's exactly the kind of response that stops people like me using forums like this.
    I'm sure it's not intended to be received like this and I am sure that the way you have responded is quite normal in the rules of a forum like this. However, it is not normal for those of us who aren't familiar with forums and who only encounter them when they have a genuine problem. This is why I hope it is helpful to respond in full.
    The reason I posted here is as follows. I was directed here by the apple support website. The original comment seemed to be the only one I could find which referred to my issue. As there is no obvious guidance on how to post on a forum like this it seemed perfectly reasonable to try and join in a conversation which might solve more than one problem at once.
    Bee's reply however is both helpful and warm. This could in fact be a template for how new members should be welcomed and inducted into the rules of the forum in a friendly and inclusive way. Thank you very much indeed Bee!

  • Can Adobe Distiller be used for converting all pro/e (3D -2D)  files to pdf format?

    Can Adobe Distiller be used for converting all pro/e (3D -2D)  files to pdf format?

    Acrobat Distiller Server converts Postscript to PDF.

  • Wanted to know that can we export the Crystal report in .rtf file

    Hi,
    We are using your u201CCrystalu201D product version 8.5, We have  a valid license .
    Our license number is u201CA6A50-0910000-H410031.
    We are facing some problem while creating the report.
    We want to know that, do you have any functionality to export the report in .rtf format.
    Because here we are not able to export the crystal report in .rtf file.
    If this is possible then please help me.
    Thanks in advance..
    Thanks and Regards,
    Abhineet

    If this is a report creation question, post to the Report Design forum:
    SAP Crystal Reports
    Ludek

  • Script for Exporting 2 Pgs into 1 PDF???

    Hello, I was wondering if anyone can help me. I know there is a script that can export each page of Indesign file as a separate PDF, but is there a script out there to export every two pages of Indesign file.
    Basically what I need to do is create 300 customized documents (based on personal company information) and Export them to a PDF so that I may e-mail one to each company. The document must be two pages, the first page has the personalized (merged) information, but the second page will be exactly the same on all of them.
    Can you tell me how I can do this in Indesign, or if not Indesign, Acrobat? I ran a test with the Data Merge system in Indesign. (I created a .CSV file with 2 columns; Company Name and Company Product and took 5 five companies from the master list to test.)
    After the merge, all the fields populated correctly but I wound up with a 10 page .INDD document. (the odd number pages are the ones with all the "merged" personal info, while all the even number pages exactly the same) What I need now is every 2 pages to be exported as 1 PDF file.
    Is there is an easier way to do this? And if not in Indesign, is there an easy way to extract 2 pages at a time in Acrobat?
    Thank you very much for any help, much appreciated,
    Kevin

    Hi Kevin,<br />Here is another version.<br />copy/paste into a text editor then save as a .jsx and place it in the script folder.<br />The only thing you have to modify is the name of your pdf preset. I thought about a dialog where tou could have switched frome one preset to another easily. But it may much more efficient to just modify the name of the preset. If you want you an also make a copy with another PDF preset then rename it.<br /><br />ad = app.activeDocument;<br />pg=ad.pages;<br />var docpath = ad.filePath;<br />var docname = ad.name;<br />var nb = (Math.round(Number(pg.length/2)))<br />for(i=0; i<nb;i++)<br /><br />{<br />]var pgrgstart = (pg[(2*i)].name);<br /><br />]if(pg[(2*i+1)]==-1)<br /><br />]{<br /><br />]]var pgrgend = pgrgstart;<br /><br />]}<br /><br />]else<br /><br />]{<br /><br />]]var pgrgend = pg[(2*i+1)].name;<br /><br />]}<br /><br />]app.pdfExportPreferences.pageRange = pgrgstart+"-"+pgrgend; <br /><br />]var myPDFExportPreset = app.pdfExportPresets.item("your PDF preset"); <br /><br />b //enter the name of your PDF preset instead of your PDF preset<br /><br />]ad.exportFile(ExportFormat.pdfType, File(docpath+"/"+docname.split(".indd")[0]+"_"+"pg_"+i+"_to_"+(i+1)+".pdf"), false, myPDFExportPreset); <br /><br />}<br /><br />alert("done");

  • Need script for exporting images to EPS

    I need to write a script to export a whole bunch of files from Indesign CS3 to EPS files. Right now we do them one at a time...here are the steps we take that we would need included in the script...
    Select all (Control A), ungroup, convert to outlines (control-shift O), export (need to be able to say black or white or RGB) and then close the file without saving.
    and if there was anyway to loop this script for 20 files at a time that would be really helpful.
    Can any help or direct me to a website that can help.
    Thanks!
    Marissa

    Maybe this one: http://www.kahrel.plus.com/indesign/batch_convert_cs3.html
    Peter

  • Shell script for export and import

    Hi,
    I want to run exp command in background since i need to export 40gb database of other database
    if i won't use & my session will die.
    appreciated any inputs.
    i need to run this line from shell script.
    /oracle/bin/exp pin@voipdbstg/pin file=voip.dmp owner=pin log=voip.log
    bash-2.05$ more export.sh
    #!/bin/sh
    /oracle/bin/exp pin@voipdbstg/pin file=voip.dmp owner=pin log=voip.log
    bash-2.05$ sh export.sh &
    [10] 13352
    bash-2.05$
    Export: Release 8.1.7.0.0 - Production on Fri Dec 4 22:51:09 2009
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Password: pin
    bash: pin: command not found
    [10]+ Stopped sh export.sh
    input appreciated
    thanks
    Prakash

    Hi,
    /oracle/bin/exp pin@voipdbstg/pin file=voip.dmp owner=pin log=voip.log
    should be
    /oracle/bin/exp pin/pin@voipdbstg file=voip.dmp owner=pin log=voip.log
    Also for running the script is background and you should be able to log out of shell scriptthen run the command in nohup mode.
    $nohup export.sh&
    Regards

  • Error for linking ecatt Script for exporting parameter

    Hi,
    We have 2 SAPGUI scripts, one is transaction CO01 to create the production order. The other is CO02 to release the production order. In the first script I get production order number as parameter 1 in the message field. I need to export this field to second script for releasing order.
    I am not able to pick the order.
    Tried to use ABAP code
    ABAP.
    DATA: z_aufnr like CAUFVD-AUFNR.
    get parameter id 'ANR' FIELD Z_AUFNR.
    ENDABAP.
    Still export parameter in log comes as empty. So if I create thrid script using ref# it errors out at second script start.
    Your help is greatly appreciated.
    Thanks,
    Gajanan

    Hi
    you don't have to use abap for this .
    in the command editor
    choose first script recording interface and double click it ,observe the screen list on right side and now select the last screend and double click field and parameterize it say give it a  name as variable1 by entering this in valin column.
    Create a parameter and by param1 name and export type and default values as variable1.
    Now for the second script create a parameter as import type and set it's value as &param1&.
    Also pass this value to second script by the same as you done for first script.
    This will work for sure.
    To know more how to parameterize follow the links,
    /people/sapna.modi/blog/2006/04/10/ecatt-scripts-creation-150-tcd-mode-part-ii
    http://www.sapecc.com/tutorials/secat_create.htm
    Please reward points.

Maybe you are looking for

  • I tunes synch to Honda car audio system

    How do I synch my playlist in Itunes to my 2011 Honda car audio system using a flash drive?

  • Can't Dowland OS X Yosemite 10.10.3

    Please help me ! I'd like to dowland OS X Yosemite 10.10.3 but I don't have the update . . . ( I'm French )

  • Music player in iPhone doesn't show cover of album, downloaded from itunes

    I bought an album on iTunes and downloaded it on the iPhone (without program). The music player program doesn't show the album cover. I see it in iTunes program on computer, but don't see it in iPhone. Deleted album from iPhone, uploaded it again, us

  • Album artwork gone after ios5 update

    So I just finished the update which went through with no problems but all my album artwork is gone on the ipad. anyway to fix this? when the next update comes out will it automatically put the artwork back on?

  • Re: Galaxy S6 Pre-Order

    You're not the only one with this problem. When I called to even ask my store about their shipment they were extremely rude about telling me that they wouldn't tell me anything other than to wait on the email. I too was told that the shipment had bee