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

Batch export multiple file types

New Here ,
Oct 25, 2021 Oct 25, 2021

Copy link to clipboard

Copied

I have a script that allows me to save my indd file as both indd and idml. I want to add indt to the file types. For idml I used "ExportFormat.INDESIGN_MARKUP", but cannot find the method name for indt anywhere online. INDESIGN_TEMPLATE was my only guess and it did not work. Any ideas?

TOPICS
Scripting

Views

147

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
New Here ,
Oct 25, 2021 Oct 25, 2021

Copy link to clipboard

Copied

Solved. For anybody else looking, use INDESIGN_MARKUP for indt as well.

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 ,
Oct 25, 2021 Oct 25, 2021

Copy link to clipboard

Copied

Technically, you can do this with any batch file renaming app, including Adobe Bridge. I believe a template is simply a regular file that opens up as an untitled document due to the file extension. 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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 ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

Exactly.

 

Regards,
Uwe Laubender

( ACP )

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 ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

LATEST

Hi BradenSF8B,

note, that methods save() and saveACopy() both have the second argument "stationary".

The default value of this second argument is false. But if you set it to true you get what you want like that:

 

 

var doc = app.documents[0];
var templateName = doc.name.replace(/\.indd$/i,"");

var newFile = File( "~/Desktop/" + templateName +".indt" );

doc.saveACopy
(
	newFile ,
	true
);

 

 

See DOM documentation:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Document.html#d1e49413__d1e55258

 

Regards,
Uwe Laubender

( ACP )

 

// EDIT: Had a false variable name in the line to build a new file. Sorry.

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