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

[AS][CS3] word rtf import preferences

Participant ,
Oct 28, 2009 Oct 28, 2009

Good morning everybody!

Is it possible to script (with applescript, it's all I know!) to map styles from MS Word (or RTF) to InDesign.

Obviously, you can do this manually, or you can set a default import preference, but can you use a script to either set the default import options or define the mapping?

I can't seem to find anything in the dictionary that looks like it might be relevant and the sample script on import preferences doesn't address presets.

Thanks!

b

TOPICS
Scripting
1.3K
Translate
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 28, 2009 Oct 28, 2009

For javascript, it's called "WordRTFImportPreference" (and its helpful Help string tells me this is "Word RTF import preferences." ...).

It's a property of the application: Application.wordRTFImportPreferences.

It should have been in there somewhere, but I can't find any reference to style mapping or presets -- so apparently, these cannot be scripted.

Translate
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
Participant ,
Oct 02, 2018 Oct 02, 2018

Does anyone happen to know if this has changed in the last (nearly) decade? I'm hoping to import styles from several Word docs with literally hundreds of junk styles, and want to map all character styles to [none] and para styles to a single style.

Translate
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 03, 2018 Oct 03, 2018
LATEST

Hi,

My script Place Microsoft Word_Style.scpt includes the following handler for setting RTF import preferences. Written originally for InDesign 5 and 5.5, it still works today:

(*Sets preferences for importing Microsoft Word RTF format*)

on mWordImportPrefs()

  tell application "Adobe InDesign CC 2018"

  tell word RTF import preferences

  set convert bullets and numbers to text to false

  set convert page breaks to none --can be page break or column break

  set remove formatting to false

  set import endnotes to true

  set import footnotes to true

  set import index to true

  set import TOC to true

  set import unused styles to false

  set preserve graphics to true

  set resolve character style clash to resolve clash use existing

  set resolve paragraph style clash to resolve clash use existing

  set use typographers quotes to true

  --note: the following are valid if remove formatting is set to true

  --set convert tables to Unformatted Table --can be Unformatted Tabbed text

  --set preserve local overrides to true

  end tell

  end tell

end mWordImportPrefs

Since you want to set all paragraph styles to a single style and character styles to none, you might want to just set remove formatting to true and preserve local overrides to false.

Shirley W. Hopkins

Translate
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