Copy link to clipboard
Copied
hi there,
understand that Save is different from SaveAs function but i could not find the "SaveAs" function using javascripingt.
There's a Save and saveACopy function but not saveAs.
Is saveACopy equivalent to SaveAs? what's the difference between the two?
Thank you.
Cheers
The difference is mentioned in the comments of the to:File parameter for these two functions.
save ("Save the document"): Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened
saveACopy ('Saves a copy of the document"): The file path for the copy. Note: Leaves the original document open and does not open the copy
(my emphasis)
TLDR: "save" without a "to" parameter is the UI's "Save" menu command. "save" with a "
...Copy link to clipboard
Copied
Copy link to clipboard
Copied
The difference is mentioned in the comments of the to:File parameter for these two functions.
save ("Save the document"): Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened
saveACopy ('Saves a copy of the document"): The file path for the copy. Note: Leaves the original document open and does not open the copy
(my emphasis)
TLDR: "save" without a "to" parameter is the UI's "Save" menu command. "save" with a "to" parameter is the UIs "Save As" menu command. "saveACopy" is the UIs "Save a Copy" menu command.
Copy link to clipboard
Copied
thanks for the reply..
I do know that SaveAs is better than Save but i can't find the AsSave function using JS?
(There's Save and saveACopy function not SaveAs)
Copy link to clipboard
Copied
From the object model viewer:
Document.save (to: File , stationery: Boolean , versionComments: string , forceSave: Boolean 😞 Document
Adobe InDesign CC 2017 (11.0) Object Model
Save the document
to: Data Type: File
Where to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened (Optional)
When you omit [to] you do a Save. When you specify a [to] you do a Save As
Copy link to clipboard
Copied
...???? I already told you. Let me highlight it:
TLDR: "save" without a "to" parameter is the UI's "Save" menu command. "save" with a "to" parameter is the UIs "Save As" menu command. "saveACopy" is the UIs "Save a Copy" menu command.
Copy link to clipboard
Copied
sorry i've overlooked that... 😜
Thank you.