17 Replies Latest reply: May 9, 2011 5:21 PM by ottopia RSS

    Export text from ID5 (Windows) to MS Word 2010

    Maria964 Community Member

      Hi, everybody. My problem goes like this:

       

      I have around 1000 pages of a book in several PageMaker 7.0 files (1 chapter per file).

      I have converted the files to ID5 and now I need to export the text and the images to get one Word file for each chapter of the book.

      The objective is a major revision/modification.

      Eack chapter has a lot of pictures placed inline that flows with the text.

      What I need is to put everything in word files in a way that would make life easier for people that is going to make modifications to the text but want to see the images (in screen resolution).

      I have no problem exporting the text from ID 5 (rtf files).

      Any ideias for putting the images on the Word file without having to do, at least, screen captures with Snagit and placing manually a representation of the images, one by one, in each of the Word files?

       

      Best regards and thank you in advance

        • 1. Re: Export text from ID5 (Windows) to MS Word 2010
          P Spier CommunityMVP

          Do you have Acrobat Pro? I haven't personally ever had a lot of luck doing this, but others report great success exporting to PDF, then saving the PDF as Word or HTML and opeing that in Word.

          • 2. Re: Export text from ID5 (Windows) to MS Word 2010
            Maria964 Community Member

            Thank you Peter, for your quick reply.

             

            I have tried acrobat pro and even Nuance PDF Converter but the Word file generated is very complicated and it will be very difficult for people with little understanding of Word to work the resulting text (this ia a Chemistry book with witk a complicated layout) and I want to make life easier for them.

             

            And if I give them complicated things, in the end, I am going to receive even more complicated things (garbage in, garbage out)...

             

            So I am going to export the text, grab the screen images with Snagit and place them inline in the correct places of the Word files.

             

            For your information: Acrobat Pro makes a wonderful export (Save as Word docx) but Nuance PDF Converter is even better, generating a file formated in Word that is less complicated because it has less formating.

             

            Best regards,

             

            Maria

            • 3. Re: Export text from ID5 (Windows) to MS Word 2010
              BobLevine CommunityMVP

              If it's a complicated ID layout you're not very likely to get anything close. See if you can get these people on InCopy.

               

              Bob

              • 4. Re: Export text from ID5 (Windows) to MS Word 2010
                Maria964 Community Member

                Peter, that is impossible! Is very hard to «teatch» anything to University teatchers. They only know Tex and Word...

                 

                Thank you again

                 

                Maria

                 

                PS. Sorry for my lousy english!

                • 5. Re: Export text from ID5 (Windows) to MS Word 2010
                  P Spier CommunityMVP

                  That last suggestion was from Bob, not me.


                  • 6. Re: Export text from ID5 (Windows) to MS Word 2010
                    Joel Cherney Community Member

                    <comedy option>

                     

                    Well heck, why don't you just rebuild it in TeX instead of in Word?

                     

                    That way, you'll actually have something publication-ready once you're done collating edits, instead of having to harvest changes from who knows how many Word files and flow those changes back into the ID file.

                    • 7. Re: Export text from ID5 (Windows) to MS Word 2010
                      ottopia Community Member

                      I work for the publishing area of my University, and I have developed some workflows and some AppleScript Studio Applications to handle what you are looking for. The Word Export application I have developed allows us to export documents and retain images, so that they can be edited and then reimported back into InDesign with the changes. All images must be inline and linked.

                       

                      These are AppleScript based apps, so won't work on Windows, but if you can find someone with Visual Basic scripting skills, the process is fairly straight forward, and is as follows:

                       

                      Find all images and replace with text containing the path to the original image. wrap this in a couple of unique tags that never appear in any of your documents. For example, I use <</path/to/image>>.

                       

                      Once the images have all been replaced, export the stories as RTF files.

                       

                      Load the files into Word and find the text contained within tags (<<*>>) for each image. This will give you the path back to the image and the location where it needs to be inserted. Insert the image and set it to save with the file. If you make sure you also set it to link to the file, when you import the document back into InDesign, it will relink to the original files.

                       

                      Good luck.

                       

                      Regards.

                      • 8. Re: Export text from ID5 (Windows) to MS Word 2010
                        Maria964 Community Member

                        @ Bob and @Peter --- Sorry

                        • 9. Re: Export text from ID5 (Windows) to MS Word 2010
                          Maria964 Community Member

                          Thank Joel for your sugestion. But I do not know how to work in Tex.

                           

                          Regards

                          • 10. Re: Export text from ID5 (Windows) to MS Word 2010
                            Maria964 Community Member

                            Thank you Uttopia for your sugestion. But it seems that captions does not work with inline graphics (for exemple: MathType equations placed inline with the text). Is it true?

                             

                            Regards

                            • 11. Re: Export text from ID5 (Windows) to MS Word 2010
                              ottopia Community Member

                              Actually, MathType was the reason I took that approach, and scripting it is the only practical way when dealing with a large quantity of equations. Yes you are correct that captioning does not work on inline graphics. The path to the image file is not inserted as a caption, the original image is deleted and replaced with the path text. Once the RTF files are exported, the file is then close without saving so as not to overwrite the original work.

                              • 12. Re: Export text from ID5 (Windows) to MS Word 2010
                                BobLevine CommunityMVP

                                Unfortunately, what you're trying to do is very much the same as putting an egg back in its shell after making an omelette. Going from Word to InDesign is quite simple...the other way around, not so much.

                                 

                                Bob

                                • 13. Re: Export text from ID5 (Windows) to MS Word 2010
                                  Maria964 Community Member

                                  @Ottopia:

                                  ---- thank you again for the info. Next week I am going to dig on your solution a bit more. I think that it is going to be very useful in future projects. Most of my work revolves around typesetting math and lots of time it is necessary to do a makover of a old edition and 90% of the contents allready exits in Indesign with embeded Mathtype equations and the autors want the text back in Word (the only thing they know how to work -- if you only have one hammer everything looks like nails). I will keep you informed. Nice weekend.

                                   

                                  @Bob Levine:

                                  --- That is true in the analogic world. Perhaps in the digital world it is possible to eat the omellete and after that put back the eggs in the shelf using the chickens from Ottopia farm. Thank you and have a nice weekend.

                                   

                                  Maria

                                   

                                   

                                  • 14. Re: Export text from ID5 (Windows) to MS Word 2010
                                    Maria964 Community Member

                                    Hi Ottopia,

                                     

                                    I am really interested in your worflow for exporting inline MathType equations with text to MS Word files. I can «see» the process you describe. How do you resolve the problem that captioning does not work with inline graphics? With a script?

                                     

                                    I think I could obtain help with the «MS Word» side of the problem because I know a guy that works with Visual Basic.

                                     

                                    Best regards and thank you in advance

                                     

                                    Maria

                                    • 15. Re: Export text from ID5 (Windows) to MS Word 2010
                                      ottopia Community Member

                                      Hi Maria,

                                       

                                      Not sure how image captions crept into this discussion, but I guessing a language confusion.

                                       

                                      Essentially my application works as follows:

                                       

                                      It gathers a list of all open documents and their stories, and all the graphics within the stories. Each graphic is checked to make sure it is linked (not embedded), and is inline (not floating) and gives a warning if there is a problem.

                                      Screen shot 2011-04-29 at 9.34.38 AM.png

                                      Once activated, it finds all the inline graphics,

                                      Screenshot2011042985311.png

                                      deletes them and replaces them with the full path to the linked file, wrapped in double < and > symbols. I use this symbol pattern because it is never used in any of our material.

                                      Screenshot2011042985434.png

                                      The stories are then exported to rtf files, and all the documents are closed (without saving).

                                       

                                      The exported stories are then opened into Word and each placeholder is found using <<*>>, this gives the location for the graphic, and the path can be extracted from the content of the find. The graphic is then inserted, replacing the placeholder text, and repeated until there are no more find results. There may be an easier way to do this bit, but this work for me.

                                       

                                      A Word version of the InDesign styles are merged from a separate Word template file to fix other layout incompatibilities.

                                       

                                      The files are then saved as Word files.

                                       

                                      The application also performs few more functions happening in the background as well to compensate for compatibility problems between the InDesign and Word styles.

                                       

                                      This is all done with a combination of AppleScript and Javascript. You should be able to achieve the same with Visual Basic.

                                       

                                      Hope this makes it a bit clearer on what to do, and private message me if you need me to talk to your programmer on any details.

                                       

                                      Regards.

                                      • 16. Re: Export text from ID5 (Windows) to MS Word 2010
                                        Maria964 Community Member

                                        Thank you very much and congratulations: you are a very smart guy!

                                         

                                        I am going to develop a system like this one. It will take time but, in the long run it is going to pay.

                                         

                                        All my math books are made using MType inline equations and I am in this business for a long time. I do not need a very sofisticated workflow like the one you developed.

                                         

                                        The real problem is javascripting. I wonder if you, in your spare time could do for me a script that replaces all the inline equations with the respective path to the file and inclosed in "<<path>>"? There is no need for those checks that you use in your workflow. I think that basically the script is just a loop that takes care of each of the equations one by one...

                                         

                                        Best regards,

                                         

                                        Maria

                                        • 17. Re: Export text from ID5 (Windows) to MS Word 2010
                                          ottopia Community Member

                                          Hi Maria,

                                           

                                          Here is the snippit of JavaScript to replace the graphics with the file path. My JS skills are poor, but this does the job.

                                           

                                          There is no error checking of any kind, and you need to select a text frame containing the story before running the script. Once complete you can export the story as an RTF file for Word. Your VB programmer can then do the rest.

                                           

                                          Remember not to save the document once you run the script or you will loose all your placed graphics. In fact, making a backup of the file first might be a good idea.

                                           

                                          Regards.

                                           

                                          FIXED: Graphics in tables are now correctly replaced.

                                           

                                          var mySelectedStory = app.selection[0].parentStory
                                          var myGraphics = mySelectedStory.allGraphics;
                                          
                                          for (var i = 0; i < myGraphics.length; i++) {
                                              var thePath = "<<" + myGraphics[i].itemLink.filePath + ">>";
                                              var myGraphicStory = myGraphics[i].parent.parent;
                                              var myLocationIndex = myGraphicStory.index;
                                              myGraphicStory.parent.insertionPoints.item(myLocationIndex).contents = thePath;
                                              myGraphics[i].parent.remove();
                                          }
                                          

                                           

                                          Message was edited by: ottopia