Skip to main content
lfcorullon13651490
Legend
September 30, 2021
Answered

[SCRIPT] Word import options

  • September 30, 2021
  • 2 replies
  • 1691 views

Any suggestion on how to import multiple Word documents (each Word to a new InDesign document) using an import preset? I have the SMP file and need to apply it to all selected Word files. I though I can show the import dialog options in the first one, I instructed my client to set the preset to be the default. But this way just the first Word file receives the import options set in SMP file.

 

Any thoughts?

This topic has been closed for replies.
Correct answer lfcorullon13651490

I made it my own way. Placing the smp file, reading it, making relations of the styles and then changing the imported text with find/change.

2 replies

lfcorullon13651490
lfcorullon13651490AuthorCorrect answer
Legend
October 7, 2021

I made it my own way. Placing the smp file, reading it, making relations of the styles and then changing the imported text with find/change.

Legend
September 30, 2021

Hello @lfcorullon13651490,

 

Can you post what you have working so far?

 

Regards,

Mike

lfcorullon13651490
Legend
September 30, 2021

My function to place the word files is like this:

for (var i=0; i<dwords.length; i++) {
    var opts = (i===0) ? true : false;
    var f = File(dwords[i]);
    tf.place(f , opts);
}

As mentioned, the first one results OK, all other Word files in the folder (which I stored in the dwords variable) results in an InDesign document without, for example, the style mappings.

Legend
September 30, 2021

Hello @lfcorullon13651490,

 

Take a look at the post from Peter Kahrel below, it might be exactly what you're trying to create.

If not at least you'll see that......."it's not possible for a script to use InDesign's presets for placing Word documents. Before running the script, you need to create a preset and set it as the default."

https://creativepro.com/files/kahrel/indesign/place_documents.html

 

Regards,

Mike