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
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.
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).
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.