Skip to main content
Inspiring
November 21, 2025
Question

How to Save a Copy Using InDesign UXP With No Dialog Box

  • November 21, 2025
  • 1 reply
  • 84 views

Hi everyone,

I’m looking for a way to save a copy of the active InDesign document using the UXP API
My requirements are:

  • Save a copy in the same folder as the active document

  • Save the copy without showing any dialog box

Is there a UXP method that supports this?

 

1 reply

jim65richards
Participant
January 28, 2026

Hello,
To save a copy silently in the same folder using UXP, use the document.saveACopy() method. You’ll need to generate a File object for the new path using the uxp.storage module to ensure it bypasses any user-facing "Save As" dialogs.

 

JavaScript:
const activeDoc = app.activeDocument;
const copyFile = await require("uxp").storage.localFileSystem.getFileForSaving(`${activeDoc.name.replace(".indd", "")}_copy.indd`);
activeDoc.saveACopy(copyFile);

 

Regards,
Jim R.
Empower Retirement