saveAs

Syntax

Workflow.saveAs();

Parameters

Return value Document

The Document object representing the document saved as a new Studio Server object.

Description

The saveAs() method saves the active document as a new object in Studio Server. Set the desired metadata on the document via entMetaData before calling saveAs(). Throws an exception in case of an error.

Use the ”Type” key in the entMetaData to indicate what kind of object should be created. Possible values are: ”Layout”, ”LayoutTemplate”, ”LayoutModule” or ”LayoutModuleTemplate”.

Examples

Save the active document as a new Studio Server object

// Set the required metadata and save the document as a new Studio Server object.
var doc = app.activeDocument;
doc.entMetaData.set(Name, New Layout Copy);
doc.entMetaData.set(Brand, WW News);
doc.entMetaData.set(Type, Layout);
try {
  var newDoc = doc.entWorkflow.saveAs();
  alert(Saved as:  + newDoc.name);
} catch (e) {
  alert(Save as failed:  + e.message);
}

Supported versions

Adobe Version Supported
2023
2024
2025
2026