Easy Fixes for Microsoft Word Formatting in InDesign

This article originally appeared on InDesignSecrets.com, which recently introduced free membership. Benefits include access to restricted content and discounts on goods and services.
I could fill an entire seminar with tips and techniques for successful Microsoft Word/InDesign workflows — in fact, I have! But one part of the workflow that doesn’t get much press is scripts. They automate tasks that would take you a long time to do by hand, and you don’t have to write any code — just download the scripts, install them, and run them. The following free scripts will make you more productive when working with Word and InDesign.
Convert Local Formatting to Character Styles
If you’re having difficulty getting what you want when you apply paragraph styles to imported Word files, the problem is most likely the local formatting (style overrides) that came along for the ride. After you place the Word file but before you start applying styles, try downloading and running one of these free Javascript (cross-platform) scripts.
Preserve Local Formatting.jsx is by Dave Saunders and works for InDesign CS1 (change the script’s extension to .js), CS2, and CS3. Preserve Local Formatting can run through a selection of text (or the whole document, if nothing is selected) and replace locally-formatted bolds and italics, among others, with equivalent character styles. The script adds the styles to the Character Styles palettes on its own — no need to create them yourself.
PrepText.zip is by Jongware, and works with CS4 only. It unzips to a .jsx script. It works just like Dave’s script, or you can read the InDesign Forum thread on Adobe.com where Jongware first posted a link to the script and gave some tips on how to best use it.
In the screen shot below, I started with a paragraph full of various text styles, all created with local (manual) formatting, and an empty Character Styles panel. I opened my Scripts panel (Windows > Automation) and double-clicked the PrepText.jsx script, which created and applied all the character styles you see below.

The ability to convert local formatting into Character Styles is also available with David’s upcoming BlatnerTools plug-in for InDesign CS3 or CS4, along with dozens of other functions. You can download a free public beta of the cross-platform plug-in from the Blatner Tools page on the DTP Tools site.
Convert GREP and Nested Styles to Manual Character Styles
Let’s say you’ve cleverly tweaked certain paragraph styles to automatically apply character styles according to your specs, either via the Nested Styles pane (CS3 and CS4) or the GREP Styles pane (CS4). Everything works perfectly… until you need to export text formatted with those automatically applied character styles, such as exporting to RTF to share with a Word user. The character style formatting gets lost, and the text reverts to its base formatting defined by the paragraph style.
To retain the formatting, you need to manually apply the character style to every instance of styled text. But why waste your time doing that tedious work when two wonderful people have come up with scripts that do that for you?
ApplyNestedStyles.zip (CS3 and CS4) is a cross-platform script written by our friend Harbs (owner of In-Tools) that takes care of the Nested Styles problem. It doesn’t change the paragraph style definition at all, the paragraph style is still applying its Nested Styles as defined. It’s just that, when you run the script, the affected text also gets the same character style applied to it manually, meaning it will be correctly formatted when you export it.
TurnGrepStyles2CharStyles.zip (CS4) is a cross-platform script written by an Adobe guru from Israel named Adi Ravid. Like ApplyNestedStyle, the script manually applies the same character style to text that is styled that way because of a GREP Style defined in the parent paragraph style, and doesn’t touch the paragraph style definition. Unfortunately I didn’t bookmark the page where I learned about it — probably from a forum — and can’t find much on Google other than Adi’s mac.com public download folder where I first got the script.
The two paragraphs below are formatted with a paragraph style that uses Nested Styles to make the first word red (character style: Red text) and the next three words bold (character style: Bold lead-in). Running Harbs’ ApplyNestedStyles.jsx script doesn’t change how the text looks, but I can tell it’s done its job by selecting some of the styled text and looking at the Character Styles panel.

The style entry “Bold lead-in” is highlighted, indicating the style has been manually applied (and so the text will export with the correct formatting). But notice how you still see the notation “Bold lead-in” in the bottom status area of the panel, next to a paragraph symbol, which is InDesign’s way of telling us the character style is being applied via a paragraph style.
Converting Nested and GREP’d styles to manually applied Character Styles is also useful when you export a layout to INX (CS3 would lose CS4’s GREP Style formatting, for example); and when exporting text to ePub, XHTML, and XML.
I recommend you run these scripts on a copy of the file, though, because you really can’t do any major editing of the text without having to be careful to watch for and remove the manually-applied character styles when necessary. For example, if you add a word before the first word in either of the paragraphs in the above screen shot, you’re going to end up with two words that are red, since the existing one has the style manually applied to it.

Anne-Marie “Her Geekness” Concepción is the co-founder (with David Blatner) and CEO of Creative Publishing Network, which produces InDesignSecrets, InDesign Magazine, and other resources for creative professionals. Through her cross-media design studio, Seneca Design & Training, Anne-Marie develops ebooks and trains and consults with companies who want to master the tools and workflows of digital publishing. She has authored over 20 courses on lynda.com on these topics and others. Keep up with Anne-Marie by subscribing to her ezine, HerGeekness Gazette, and contact her by email at [email protected] or on Twitter @amarie
  • Anonymous says:

    Wher can I download this script?
    Thanks for your answer,

    Michel

  • Anonymous says:

    Where can I download this very useful script.

    Thanks a lot for your answer,

    Michel

  • Anonymous says:

    Thanks, Anne-Marie.

    I’ve been doing the same approach using the supplied-with-ID script from Olav Kvern, FindChangeByList.jsx. However it requires fiddling with cryptic code in the companion text file, and setting up your character styles in advance (I use a template file consistently at start of any project).

    By the way, I think your first screenshot may be wrong, as it’s identical to the 2nd…

    Aaron

  • Anonymous says:

    Where should I save the script file so that it appears in the InDesign Scripts?

  • Anonymous says:

    The first screenshot is in fact the wrong one. Go here to view the correct one: /wp-content/uploads/sites/default/files/story_images/20091112_fg01.png

  • >
    Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo