4 Replies Latest reply on Sep 8, 2011 4:57 AM by ikitzmann

    Create a copy of the currently open document

    ikitzmann Level 1

      Hello,

       

      I have a script that modifies and replaces the text in the current document.

       

      Is there a way to copy the current state of the current document into a new document? So that I do not touch the orginal document? I know, there is always the possibility of undo, but in this case the workflow would be much easier if I just create a new copy and the original will remain unmodified.

       

      If it is possible, I do NOT want to:

      • Save the current document to get the copy (I do not want to touch the original and a save would change the document's state)
      • "Save as copy" to a temporary location, because the script has to run both on Windows and Mac, so it would be a lot of work with temporary file locations etc.

       

       

      Is there an easy way I am not aware of?

       

      Best regards,

      Ingo

        • 1. Re: Create a copy of the currently open document
          Eli.Shklovsky Level 1

          The original document should be saved as template (indt)

          In this way on any save you will have to name the new document and the original template will remain unmodified

          Hope this helps

          Eli

          • 2. Re: Create a copy of the currently open document
            ikitzmann Level 1

            Thanks for you reply, but this does not work for me.

             

            Lets say, the script does some finalization of a document. The user edits one document but at a point wants to "preview" the final state. So he applies the script to see the final state. Then he founds some issues and wants to go back and edit the original document. At some later point he again wants to "preview" the final state and so on.

             

            Yes, there is the possibility of undo. But our users would like the script to duplicate the document into a new instance and perform the script edits in this copy. This way they do not have to remember to undo before making any changes.

             

            I hope this makes my request more clear.

             

            Ingo

            • 3. Re: Create a copy of the currently open document
              Eli.Shklovsky Level 1

              I understand that you wish to implement some version control over InDesign documents that manage minor, major and finalize the document.

              There is no version control in InDesign.

              You should implement it yourself on your script (current revision, next, previous, finalized revision and so on).

              • 4. Re: Create a copy of the currently open document
                ikitzmann Level 1

                Hi,

                 

                version control is not the idea.

                 

                Our users edit some sort of "master" document (layout, images, placeholders, ...). If this one is ready, a script creates different final versions from this master document (like different language variants, etc.). Now, the users want to preview the results with thier current state of the document.

                 

                Edit: To be more specific: they want to see one of the final versions. So the current script modifies the current open document.