Skip to main content
July 22, 2015
Question

How set name for new document?

  • July 22, 2015
  • 1 reply
  • 372 views

I run to create a new InDesign document:

app.documents.add();

The new document is given a name "Untitled-1". How specify name of the document without saving?

This topic has been closed for replies.

1 reply

Jump_Over
Legend
July 22, 2015

Hi,

Document name is "read only" and relative to file name or - in case of unsaved docs - set according to application local scheme (i.e "Untitled-13")

What is the reason you want to set this name? Just for display?

Jarek

July 22, 2015

The new document is created based on an already open. The user can examine it and take a decision to close or save. It will be more convenient to define the name of the source.

The ideal would be something like this:

app.documents.add({name: "myDocument"});

or create from a template:

app.open(myFile, true, OpenOptions.OPEN_COPY, "myDocument");