32 Replies Latest reply on Oct 1, 2008 7:50 AM by Peter Kahrel

    Export indd to doc

      Hello all members of community,
      I have a job that have done in indesignCS2 and the same work i have to do in microsoft word.
      If there is any way or any script that make this work easy and i can export all this work in word without any change in style, table, image, font etc..
      Please help me.
        • 1. Re: Export indd to doc
          Level 1
          Hi RamPD,

          The ExportAllStories example script shows the basics of exporting text in a variety of formats (including RTF, which is probably what you want). You can find this script in the sample scripts archive at the InDesign scripting home page, which is shown at the top of this forum.

          There will certainly be formatting changes between the text in InDesign and the text in Word, however.

          Thanks,

          Ole
          • 2. Re: Export indd to doc
            Level 1
            Hi Olav Kvern,
            I have searched so much in all the example of script but here is nothing, similar of this,
            Please can you give me a link of that page.
            • 3. Re: Export indd to doc
              Level 1
              You cannot export an InDesign document to a Word document. The product simply doesn't do that, so there is no reason to expect the feature to be available via scripting.

              You can export an InDesign story to RTF, but that will lose any inline graphics. To do that, use Story.exportFile().

              Dave
              • 4. Re: Export indd to doc
                Level 1
                Hi RamPD,

                The direct link to the archive (which is at the bottom of the page I directed you to earlier) is:

                http://download.adobe.com/pub/adobe/indesign/InDesign_Example_Scripts.zip

                As Dave says, however, it won't export .doc files--just RTF. That's sufficient to get the text back into Word.

                I'd also note that I think it's a good thing that inline graphics are removed--you really, really, don't want graphics making the round trip from InDesign to Word and back again via RTF export (RTF, technically, can support graphics). Word graphics are a complete nightmare, and importing them into an InDesign document is a sure recipe for a headache, if not file corruption.

                Thanks,

                Ole
                • 5. Re: Export indd to doc
                  Level 1
                  Dave and ole Thanks for your kind support,
                  But i want to something like export indd to pdf just similar if possible with a simple step can i export indd to doc, story.export only export the text without graphics, but i have in my work text, immagine, table and such...
                  Please help me.
                  • 6. Re: Export indd to doc
                    Level 1
                    The product can't do it. Scripting can't do it. There is no InDesign to Doc capability other than stories to RTF.

                    However, RTF does include tables.

                    Dave
                    • 7. Re: Export indd to doc
                      Level 1
                      Hi RamPD,

                      As Dave says, InDesign does not export Word .doc files.

                      But we've been pointing out that it does export RTF. RTF is a format that is capable of containing anything that can appear in a Word document. It's an alternative to the .doc format. RTF can support graphics, though InDesign won't export graphics to RTF.

                      For going to Word, RTF is the best option. But you will never get a Word document that will match the appearance and layout of the InDesign document--even if InDesign could export to .doc.

                      Thanks,

                      Ole
                      • 8. Re: Export indd to doc
                        sstanleyau Level 4
                        On 26/7/08 2:59 AM, "Olav Kvern" <member@adobeforums.com> wrote:<br /><br />> But you will never get a Word document that will match the appearance and<br />> layout of the InDesign document--even if InDesign could export to .doc.<br /><br />Although, depending on the document, you can get something *similar* by<br />exporting as PDF and then exporting the PDF from Acrobat as a Word document.<br />I hate to think what you'd get trying to round-trip such a thing, though.<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
                        • 9. Re: Export indd to doc
                          Prithivi_Prepress Level 1
                          Hi All,

                          I am using indesign CS3 i need to export all the stories to the single RTF files. While i am running the script "ExportAllStories.applescript" All the stories are split as a individual RTF files. So again to combine all the stories in to a single documents. So it takes time to order the text in RTF to match the indesign file. If there is any other script for export all the text stories as a single RTF files.

                          Thanks
                          Prithivit
                          • 10. Re: Export indd to doc
                            Peter Kahrel Adobe Community Professional & MVP
                            http://www.kahrel.plus.com/indesign/batch_convert_cs3.html

                            Peter
                            • 11. Re: Export indd to doc
                              Peter - thank you for the link. Unfortunately the document doesn't download to my Mac. I have tried opening it in text and in ExtendScript toolkit but all I get is reams of stuff like this:

                              jEjJjBjMjPjHOAlGiDJiRnASzKjDjPjOjWjFjSjUjEjMjHPAEjzGiXjJjOjEjPjXQfRCFeGjEjJjBj
                              MjPjHFeOiFjYjQjPjSjUhPiDjPjOjWjFjSjUftnftJiSnABXzLjPjSjJjFjOjUjBjUjJjPjORfVPfAn
                              eDjSjPjXfJiTnABXzNjBjMjJjHjOiDjIjJjMjEjSjFjOSfVPfAARCFeEjMjFjGjUFeDjUjPjQfnfJiW
                              nASzMjDjPjOjUjSjPjMiHjSjPjVjQTBEXzDjBjEjEUfVPfARBFeFjHjSjPjVjQffnftJiXnABXRfVTf
                              BneGjDjPjMjVjNjOfJiYnABXSfVTfBARCFeEjMjFjGjUFeDjUjPjQfnfJiZnASzLjCjVjUjUjPjOiHj
                              SjPjVjQVCEXUfVPfARBFeFjHjSjPjVjQffnftJianABXRfVVfCneGjDjPjMjVjNjOfJibnABXSfVVfC
                              ARCFeFjSjJjHjIjUFeGjCjPjUjUjPjNfnfJicnABjzIjPjLiCjVjUjUjPjOWfEXUfVVfCRDFeGjCjVj

                              Can you zip it up rather than have the js all unprotected?

                              Thx
                              • 12. Re: Export indd to doc
                                Peter Kahrel Adobe Community Professional & MVP
                                It is protected :) -- it's a jsxbin script (binary Javascript). Just download it to your Mac as you would other binaries (such as zipped files). Give it any name you want, but use the extension .jsxbin and the script is ready to run.

                                Peter
                                • 13. Re: Export indd to doc
                                  Level 1
                                  You'll need to right-click and save the link rather than just click on it.

                                  Dave
                                  • 14. Re: Export indd to doc
                                    Level 1
                                    Dave & Peter: I have tried right clicking and saving the link rather than just clicking on it. My Mac says it is plain text, and when I open it in ExtendScript it asks what language it is in. I choose JavaScript and I get this (the same with everything else I try):

                                    @JSXBIN@ES@2.0@MyBbyBnAKMiPbyBnABMkWbyBn0ABOkYbkan0ACJkanASzDjEjJjSBAEXzMjTjFjMj
                                    FjDjUiEjJjBjMjPjHCfjzGiGjPjMjEjFjSDfRBFePiTjFjMjFjDjUhAjBhAjGjPjMjEjFjSffnftOkb
                                    JkcnABXzEjUjFjYjUEfVzBjGFfBneAfACzChdhdGVBfAnnbJkenABXEfVFfBCzBhLHCHXzEjQjBjUjI
                                    IfVBfAnneBhPXzEjOjBjNjFJfVBfAnnnfAUzCjcjcKCGXEfVFfBnneBhKCGXEfVFfBnneBhAnnOlBbl
                                    Dn0ACJlDnABXEfVFfBCHnnnePhAjEjPjFjThAjOjPjUhAjFjYjJjTjUntJlEnABXzGjBjDjUjJjWjFL
                                    fVFfBnctfAhzBhBMXzGjFjYjJjTjUjTNfEjDfRBXEfVFfBffnACF40BhAB40BiABBAzMjGjPjMjEjFj
                                    SjEjJjBjMjPjHOAlGiDJiRnASzKjDjPjOjWjFjSjUjEjMjHPAEjzGiXjJjOjEjPjXQfRCFeG

                                    etc.
                                    • 15. Re: Export indd to doc
                                      Level 1
                                      Don't open it in the ESTK. Just run it from InDesign.

                                      Put it in

                                      Adobe InDesign CS3/Scripts/Scripts Panel

                                      Then open the scripts panel in ID, and run it from there.

                                      Bob
                                      • 16. Re: Export indd to doc
                                        Level 1
                                        When I double click the jsxbin file all I get is the junk beforementioned. When I try to open it with Stuffit expander I get this message:

                                        "The file "batch_convert_cs3.jsxbin" does not appear to be compressed or encoded..."
                                        • 17. Re: Export indd to doc
                                          Level 1
                                          Thx for the suggestion Bob but when I open it from InDesign Scripts, I get this message:

                                          JavaScript Error!

                                          Error Number: 25
                                          Error String Expected:
                                          Line 1
                                          Source:
                                          @JSXBIN@ES@2.0@MyBbyBnAKMiPbyBnABMkWbyBn0ABOkYbkan0ACJkanASzDjEjJjSBAEXzMjTjFjMj
                                          Offending Text: 0

                                          Has anyone else on Macs had this problem? I am using InDesign CS3 on Leopard 10.5.5.
                                          • 18. Re: Export indd to doc
                                            Peter Kahrel Adobe Community Professional & MVP
                                            I do apologise -- I just tried the script from the web site and got the same error as you did. Looks as if something got corrupted in the script. I replaced it, so please try to download the script again, it should work now.

                                            As Dave and Bob said, you can't open it in the ESTK or run it from there: run it from the Scripts panel in InDesign.

                                            Peter
                                            • 19. Re: Export indd to doc
                                              Level 1
                                              Hi Peter
                                              Thanks for replacing it, but it still doesn't work. Still get the same error.

                                              Merrie
                                              • 20. Re: Export indd to doc
                                                Level 1
                                                What file name are you using when you save the script?

                                                Dave
                                                • 21. Re: Export indd to doc
                                                  Peter Kahrel Adobe Community Professional & MVP
                                                  Merrie,

                                                  Just now I downloaded the script again and it works fine. Are you sure you're using the correct version? Delete all versions of the script you downloaded earlier, then download it again. Use a name you've not used before, and make sure that the extension is .jsxbin. Run the script from the Scripts panel, don't attempt to load it in ESTK.

                                                  Peter
                                                  • 22. Re: Export indd to doc
                                                    Level 1
                                                    Whatever name I save it as I get this message (with the name changed, if I have change it):

                                                    Save Plain Text

                                                    The name "batch_convert_cs3.jsxbin" appears to have an extension. Do you want to append ".txt" to the name?

                                                    Dave: the above is the name I am using most of the time.

                                                    I am baffled, but maybe it isn't so important that you and Peter are spending so much time over it.
                                                    • 23. Re: Export indd to doc
                                                      Prithivi_Prepress Level 1
                                                      Hi Peter and All

                                                      Thanks. We have downloaded the script and it was working good. Thanks once again.

                                                      Regards
                                                      Prithivi
                                                      • 24. Re: Export indd to doc
                                                        Peter Kahrel Adobe Community Professional & MVP
                                                        Merrie,

                                                        I think you're still displaying the script by clicking "Download script", then saving it. But you should right-click it, then pick "Save link as", and download it.

                                                        > I am baffled,

                                                        Me too!

                                                        > but maybe it isn't so important that you and Peter
                                                        > are spending so much time over it.

                                                        No problem at all.

                                                        Peter
                                                        • 25. Re: Export indd to doc
                                                          Peter Kahrel Adobe Community Professional & MVP
                                                          Thanks for letting us know, tprithivirajan.

                                                          Peter
                                                          • 26. Re: Export indd to doc
                                                            Level 1
                                                            Merrie,

                                                            It sounds as though you are copying and pasting the text you see on the page if you just click on the link. That won't work. You have to download the script by either right-clicking or Control-clicking and then choose save link as...

                                                            Dave
                                                            • 27. Re: Export indd to doc
                                                              Level 1
                                                              Peter,

                                                              I avoid posting jsxbin files without first zipping them to avoid this problem of not getting an automatic download when you click the link.

                                                              Dave
                                                              • 28. Re: Export indd to doc
                                                                Peter Kahrel Adobe Community Professional & MVP
                                                                >I avoid posting jsxbin files without first zipping them to avoid this
                                                                >problem of not getting an automatic download when you click the link.

                                                                Good idea I've done that just now.

                                                                Thanks,

                                                                Peter
                                                                • 29. Re: Export indd to doc
                                                                  Level 1
                                                                  >>It sounds as though you are copying and pasting the text you see on the page if you just click on the link.

                                                                  No, I have been right-clicking.

                                                                  >>That won't work.
                                                                  I know that. I have been right-clicking then either saving the document into Downloads or directly into the Scripts panel folder.
                                                                  • 30. Re: Export indd to doc
                                                                    Peter Kahrel Adobe Community Professional & MVP
                                                                    Merrie,

                                                                    I've placed a zipped version. Did you try that?
                                                                    • 31. Re: Export indd to doc
                                                                      Level 1
                                                                      Well, now I have figured out the problem. I was expecting a .zip file and I still got the same old one, so I pressed the refresh button.

                                                                      So, it seems I was using what must have been a cached version of your page all this time. This must be new Safari behaviour under Leopard as I was always clicking on your link on this page and it should have refreshed automatically.

                                                                      Have just tested the script. It works, but the stories are a bit mixed up. They must go by the story number rather than by page number. Also I could not select the folder I wanted the rtf to go. But it is a really great script, Peter.

                                                                      Many thanks for persevering with my travails...
                                                                      • 32. Re: Export indd to doc
                                                                        Peter Kahrel Adobe Community Professional & MVP
                                                                        Glad you found what messed up your downloads.
                                                                        >but the stories are a bit mixed up

                                                                        I don't think that story numbers (the way that ID sees them) are a reliable way of ordering stories. Don't know that for a fact -- should look into that.

                                                                        Peter