6 Replies Latest reply on Feb 5, 2017 1:48 AM by Laubender

    Convert Word Document to indesign file with InDesign Server

    alexanderk57613459

      Hello.

       

      1. I'm using InDesign server not the simple InDesign application.

      2. Documentation says that the functions of server and the application are identical.

      3. I've found that as server as application can import Microsoft Word files (according to ansvers for CS2 server).

      4.I can not find any examples of import in the adobe scripting guides.

      5. The java script fragment

           app.open(File("....doc"))

          does not work for doc files.

      6. There are a lot of proposials to convert word to pdf at first with another tools - it is unacceptable for me.

       

      So, could you please appoint to the exact script fragment for the importing Microsoft Word documents?

       

      Thanks.

      -Alex.

        • 1. Re: Convert Word Document to indesign file with InDesign Server
          TᴀW Adobe Community Professional & MVP

          In InDesign, one "places" Word documents, rather than open. So try using the place() method of an insertionPoint (or any Text object):

           

          InsertionPoint.place (fileName: File , showingOptions: Boolean , withProperties: Object ):Array of varies

          Adobe InDesign CC 2015 (11.0) Object Model

          Places the file.

          fileName: Data Type: File

          The file to place

          showingOptions (optional): Data Type: Boolean , Default Value: false

          Whether to display the import options dialog (Optional)

          withProperties: Data Type: Object

          Initial values for properties of the placed object(s) (Optional)

           

          Ariel

          • 2. Re: Convert Word Document to indesign file with InDesign Server
            alexanderk57613459 Level 1

            Thanks a lot for a detailed answer.

             

            I just would like to specify a couple items:

            -Does it means that I can place the word document into .indd file and print it as a pdf, for example?

            -Should I perform some additional processing of placed word document to place it into .indd?

            -Otherwize could you please appoint the sequence of basic steps to implement word->indd convertion?

             

            Thanks.

            -Alex

             

            • 3. Re: Convert Word Document to indesign file with InDesign Server
              TᴀW Adobe Community Professional & MVP

              Hi Alex,

               

              You can indeed place a Word document into an InDesign file and print it as a PDF. But when the Word document comes into InDesign, expect a lot of work tidying up the formatting, redesigning, and preparing the file for the correct sort of PDF (digital or print) that is required. This is a big job usually (unless you're lucky with your Word file, or it's very simple, or you really don't care what it looks like much) -- and many people have full-time jobs, if not careers, doing just that all day :-)

               

              "-Should I perform some additional processing of placed word document to place it into .indd?"

              Are you talking about from a scripting perspective? From a scripting perspective, you do not have to do anything special to a Word file to be able to place it into InDesign. (But from a practical point of view, people usually do prepare Word files before placing, to make it easy to work with them afterwords in InDesign.)

               

              "-Otherwize could you please appoint the sequence of basic steps to implement word->indd convertion?"

               

              InDesign, place your text cursor in a text frame somewhere. Then run this one-line script:

               

              app.selection[0].place("C:\\MyFile.doc");

               

              That's the basics.

               

              Ariel

               

              PS It sounds to me like you need to get a little more familiar with using InDesign. For scripting, it's always good to know first how to do something in InDesign with the regular UI before trying to script it, because scripting really basically just replicates the steps you would be doing manually as a user.

              • 4. Re: Convert Word Document to indesign file with InDesign Server
                alexanderk57613459 Level 1

                Thanks, Ariel.

                 

                I've made the doc placing in the regular UI.

                It seems it requiers manual page-by-page frames filling.

                The place() method itself has an autoflow flag that should lead to some kind of autoadding/autofilling frames.

                At the first glance It could be queit simple in case if we can get word document page amount before the placing.

                The another common way is spreading the content of doc with cycling with text frames adding and overflow checking.

                 

                Thanks.

                -Alex

                • 5. Re: Convert Word Document to indesign file with InDesign Server
                  TᴀW Adobe Community Professional & MVP

                  I've got a blog post that shows a very simple implementation of creating and linking new text frames until all the text is visible here:

                   

                  https://www.id-extras.com/multi-file-auto-place

                  • 6. Re: Convert Word Document to indesign file with InDesign Server
                    Laubender Adobe Community Professional & MVP

                    alexanderk57613459 wrote:

                    … The place() method itself has an autoflow flag that should lead to some kind of autoadding/autofilling frames. …

                    Hi Alex,

                    now reading that thread here, that is related to the other one you started, I could see a potential problem with your thinking.

                    Generally spoken, method place() itself has no autoflow flag. Only when it's used with the Page object.

                    See my reply here:

                     

                    Re: Place all Microsoft Word pages in the .indd document

                     

                    Regards,
                    Uwe