Skip to main content
Known Participant
March 21, 2022
Question

Can InDesign.exe be run with any command line switches?

  • March 21, 2022
  • 4 replies
  • 1594 views

Using InDesign 17.1 in Windows 11.

Can InDesign.exe be run with any command line switches?

Making "InDesign.exe [path\document.indd]" the target in a Windows shortcut will open document.indd in ID.

What I'm wondering is if there is command line switch that would allow a template to be opened as original in ID using a shortcut in a similar way? Say, "InDesign.exe [template.indt] /o" or something?

Thanks.

This topic has been closed for replies.

4 replies

James_M_SAuthor
Known Participant
March 22, 2022

Thanks for the replies. I couldn't find anything in the documentation about startup switches. But I thought I'd ask because word processors and other software often allows you to do things like this from the command line.

 

I was working on a template and  hoped there was a simple way of opening it as original without opening ID first. If I have to do it very often, I'll look at doing it with a script.

James Gifford—NitroPress
Legend
March 22, 2022

If it's just one template, a desktop icon to the template file will work as well as any of these around-the-barn methods. Even if you have several templates, keeping them (or their shortcuts) in a group on the desktop, in a desktop folder or in any similar organized manner will let you open ID to that template, and away you go.

 

If you want to force a save to a new file... just tag the template file read-only.

 

And I'll point back to right-click/pin, with an RO file, as possibly the most integral and simple solution of all.

 

James_M_SAuthor
Known Participant
March 22, 2022

But I think clicking on a shortcut to a template that will open a new file based on the template. What I was hoping to be able to do is click on a shortcut to the template and have it open as original so it can be changed.

Legend
March 22, 2022

You can write a startup script.

A startup script can read environment variables via $.getenv("variable") or you modify the script itself to refer to the file name.

 

Joel Cherney
Community Expert
Community Expert
March 21, 2022

I'm medium sure that InDesign Server allows for this, but it's not as easy to do with your desktop install of InDesign. I have never done it myself, but I've summarized this posting to StackExchange for other people in your position, and it apparently works okay, even if it's a bit cumbersome.  Basically, you can't run InDesign from the command prompt but you can run ExtendScript host, which you can then use to run an InDesign script. A side-conversation from that post (featuring Loic Aigon!) shows how to pull it off with Visual Basic. 

 

Anyways, I don't know if this will help your forced-template-automation or not, but good luck! In your shoes, I'd maybe think about doing something in the GUI, maybe with AutoHotkey.

James Gifford—NitroPress
Legend
March 21, 2022

Probably not; at least, I've never seen references to command line switches for any of the Adobe apps.

 

It's not comprehensive and you undoubtedly know it, but you can right-click on the ID icon and get all the recently-opened documents, and pin some good number of them for permanent access. I use this continually for my current project line up, and all I have to so is take a moment to pin and unpin whatever's currently in the heap. Presto, two click access to any document.

 

(Of course, this ignores everything MS screwed up with the Win11 taskbar, including the infuriating feature of having the app name pop up and block your right-click unless you're fast enough... sigh.)