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

[SCRIPT] Word import options

Enthusiast ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

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?

TOPICS
Scripting

Views

751

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

correct answers 1 Correct answer

Enthusiast , Oct 07, 2021 Oct 07, 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.

Votes

Translate

Translate
Advisor ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

Hello @lfcorullon,

 

Can you post what you have working so far?

 

Regards,

Mike

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
Enthusiast ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

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.

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
Advisor ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

Hello @lfcorullon,

 

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

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
Enthusiast ,
Sep 29, 2021 Sep 29, 2021

Copy link to clipboard

Copied

I see this post from Kahrel.

And, as I told, I'm using exactly this. I'm setting the preset in the first Word placement and set the selected preset as default. If I don't misunderstood, I don't need to create a new preset each time I want to place a Word file using script.

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 ,
Sep 30, 2021 Sep 30, 2021

Copy link to clipboard

Copied

You didn't misunderstand. If it no longer works, then that's an InDesign problem.

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
Enthusiast ,
Oct 07, 2021 Oct 07, 2021

Copy link to clipboard

Copied

LATEST

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.

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