Copy link to clipboard
Copied
Nightmare task, preparing .docx files as the lowest common denominator to transfer content from other environments into InDesign. The idea, which hasn't fallen over so far, is that we spend some time looking at a representative document and prepare a master InDesign file with a first set of style defitions; then we import a first .docx, import the InDesign style definitions over the top of the .docx definitions, stand back in amazement and admire the results.
Known snag: as we continue processing .docx files, we are going to run into style definitions that are not present in our InDesign template. Question: is there an easy way to identify these intruders and add them to the template?
[can't help thinking Wolf in sheep's clothing or possibly The body-snatchers, but those wouldn't count as "simple subjects"]
There ParagraphStyles panel shows an imported icon with imported styles:
The is also a true or false imported property, which you can get via scripting. This would get a list of imported styles
var cs = app.activeDocument.paragraphStyles;
var pl = "Imported Paragraph Styles \r"
for (var i = 0; i < cs.length; i++){
if (cs[i].imported) pl += cs[i].name + "\r"
}
alert(pl)
Copy link to clipboard
Copied
There ParagraphStyles panel shows an imported icon with imported styles:
The is also a true or false imported property, which you can get via scripting. This would get a list of imported styles
var cs = app.activeDocument.paragraphStyles;
var pl = "Imported Paragraph Styles \r"
for (var i = 0; i < cs.length; i++){
if (cs[i].imported) pl += cs[i].name + "\r"
}
alert(pl)
Copy link to clipboard
Copied
Short of tagging text in Word and using those tags to match up with your InDesign paragraph and character styles, with varying degrees of success, I know of no way to automatically seek out these intruders and assimilate them into the borg.
But if you want to do this by hand, it is possible to recognize the body (type) snatchers and deal with those anomalies as they're found.
But first, you need to apply some file hygenics in Word to be copascetic with your InDesign paragraph and character styles:
With these caveats covered, you can identify your style intruders pretty easily:
It'll take a little work, but if you're willing to put the effort into these tricks, you can get the results you're looking for.
Hope this helps,
Randy
Copy link to clipboard
Copied
Thanks for the extra information … I have my suspicions that my colleague may never have got as far as the Story Editor; I know she's never used an InDesign book, and I'm pretty sure from what she says that she's never generated an IDD table of contents.
Howsomedever: I've just run a small experiment. New file, place styled .docx, Load paragraph styles from a 'canonical' InDesign file. As Rob says, where there is no definition in the canonical file the Paragraph Styles panel shows a sort of Space Invaders icon. All colleague now needs to do is update the canonical file with new styles as they arrive in different .docx – probably safer if this is done style by style rather than with any sort of automation ;-}