• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

is there a document "SaveAs" function using JS

Participant ,
Aug 14, 2017 Aug 14, 2017

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

TOPICS
Scripting

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 14, 2017 Aug 14, 2017

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 "

...

Votes

Translate

Translate
Guide ,
Aug 14, 2017 Aug 14, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2017 Aug 14, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 14, 2017 Aug 14, 2017

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 15, 2017 Aug 15, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2017 Aug 15, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2017 Aug 15, 2017

Copy link to clipboard

Copied

LATEST

sorry i've overlooked that... 😜

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines