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

How to Export INDD File to New INDD File in UXP

Explorer ,
Dec 02, 2024 Dec 02, 2024

Copy link to clipboard

Copied

I am writing a UXP script that grabs INDD files in bulk and makes some changes in the file and saves off the file to a different file location. I do not want to impact the original file. Instead, I want to save it as a new file in a new location. Does anyone know if this is possible in UXP scripting? I know you can export to PDF, which I have done before. But is it possible to export from one indd to another indd in a different location? 

const update = async(inDesignFiles, destinationFolder) => {
    for (const file of inDesignFiles) {
        await app.open(file.nativePath);
        const activeDocument = app.activeDocument;
        // add more changes here to the file
        activeDocument.exportFile( ??? );

      }
}
TOPICS
Scripting , UXP Scripting

Views

111

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 2 Correct answers

Community Expert , Dec 02, 2024 Dec 02, 2024

You can save a document using a different name. Use activeDocument.save (newfilename)

Votes

Translate

Translate
Engaged , Dec 02, 2024 Dec 02, 2024

You will want activeDocument.save(File to, Boolean stationery, String versionComments, Boolean forceSave).

Votes

Translate

Translate
Community Expert ,
Dec 02, 2024 Dec 02, 2024

Copy link to clipboard

Copied

You can save a document using a different name. Use activeDocument.save (newfilename)

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 ,
Dec 02, 2024 Dec 02, 2024

Copy link to clipboard

Copied

You will want activeDocument.save(File to, Boolean stationery, String versionComments, Boolean forceSave).

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
Explorer ,
Dec 03, 2024 Dec 03, 2024

Copy link to clipboard

Copied

Awesome, thanks for the guidance. 

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 ,
Dec 03, 2024 Dec 03, 2024

Copy link to clipboard

Copied

LATEST
quote

Awesome, thanks for the guidance. One follow up, should I add the name of the new file as part of the file path in the to parameter? 


By @MahmoodTheDoom

 

You should supply path and full name. 

 

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 ,
Dec 02, 2024 Dec 02, 2024

Copy link to clipboard

Copied

@MahmoodTheDoom

 

As others pointed out - you SAVE in native format of the application - you EXPORT to other formats.

 

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
Explorer ,
Dec 03, 2024 Dec 03, 2024

Copy link to clipboard

Copied

Thanks, that makes sense 🙂 

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