[AS][CS3] word rtf import preferences
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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

