0 Replies Latest reply on Jun 26, 2013 4:41 PM by masc145

    We are using the "ExportAllText" script, But we want to format it for csv export

    masc145

      We are using the ExportAllText script, http://forums.adobe.com/thread/733900, but we want to format the text so we can import it csv format

      What we need it to change the begin of the story with (") quotes, change the end of the first paragraph with another caracter ("|"), so the first paragraph, is the first field in the comma separated value, then at end of the story another (") quote and a end of paragraph. So with this we will have two fields per row.

      In the Script this is the part where it reads the stories from the indesign document, but we do not know how to do it?

      We are using CS2

       

        for(myCounter = 0; myCounter < myDocument.stories.length; myCounter++){

          myStory = myDocument.stories.item(myCounter);

          //Export the story as tagged text.

          myStory.exportFile(ExportFormat.taggedText, myTempFile);

          //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(myCounter != 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";

          }

       

      Can any one help us

      Thank´s in Advanced