Highlighted

[jsx] File.openDialog: How to allow multiple file formats for Windows

Contributor ,
Jun 25, 2020

Copy link to clipboard

Copied

I’ve tried some variants, corresponding (or slightly playing) with the API (https://www.indesignjs.de/extendscriptAPI/indesign-latest/#File.html#d1e6347__d1e6519😞

File.openDialog( "Please choose a file", "InDesign file:*.indd;DOC file:*.doc;DOCX file:*docx;DOCM file:*.docm", false )

File.openDialog( "Please choose a file", "InDesign or Word file:*.indd;*.doc;*docx;*.docm", false )

 

But I can’t select any DOC, DOCX, or DOCM files. I’d be thankful for a good clue ...

 

Thanks,

Tobias

Hi, tobias_wantzen: 

It's just a file extension.

var myFiles = File.openDialog("Please choose a file", "*.indd;*.docx", false);

Doesn't this work?

TOPICS
Scripting

Views

82

Likes

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

[jsx] File.openDialog: How to allow multiple file formats for Windows

Contributor ,
Jun 25, 2020

Copy link to clipboard

Copied

I’ve tried some variants, corresponding (or slightly playing) with the API (https://www.indesignjs.de/extendscriptAPI/indesign-latest/#File.html#d1e6347__d1e6519😞

File.openDialog( "Please choose a file", "InDesign file:*.indd;DOC file:*.doc;DOCX file:*docx;DOCM file:*.docm", false )

File.openDialog( "Please choose a file", "InDesign or Word file:*.indd;*.doc;*docx;*.docm", false )

 

But I can’t select any DOC, DOCX, or DOCM files. I’d be thankful for a good clue ...

 

Thanks,

Tobias

Hi, tobias_wantzen: 

It's just a file extension.

var myFiles = File.openDialog("Please choose a file", "*.indd;*.docx", false);

Doesn't this work?

TOPICS
Scripting

Views

83

Likes

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
Jun 25, 2020 0
Engaged ,
Jun 25, 2020

Copy link to clipboard

Copied

Hi, tobias_wantzen: 

It's just a file extension.

var myFiles = File.openDialog("Please choose a file", "*.indd;*.docx", false);

Doesn't this work?

Yusuke S.

Likes

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
Reply
Loading...
Jun 25, 2020 0
Contributor ,
Jun 25, 2020

Copy link to clipboard

Copied

Thanks @yusuke_s, that works.

 

Tobias

Likes

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
Reply
Loading...
Jun 25, 2020 0