1 July 2018

How to prevent italics going missing when importing a Word file into InDesign

One of our clients emailed last week to see if I had an answer to the problem of italics dropping out of Word files when imported into InDesign. “Sometimes it just affects a few random book titles,” they reported, “sometimes all book titles in one chapter.”

We’ve probably all been there. There’s nothing more soul-destroying than having to open up Word and search the whole file for each instance of italic in turn and manually reapply it in InDesign, flipping between Word and InDesign all the while. And if the italics are shot, then the bolds, bold italics and other local formatting will probably need to be searched and redone as well.

And all this even though “Preserve Local Overrides” has been checked in InDesign’s import preferences:

It’s not a new problem, as this inconclusive 2010 discussion on InDesignSecrets demonstrates.

But whereas David Blatner and his correspondents ponder preliminary find/change routines in Word involving character styles and other convoluted techniques, it turns out there’s a much simpler workaround we’ve found to be robust in production over the past couple of years:

  1. Open the Word file in Word
  2. Save it as RTF
  3. Import the RTF file into InDesign instead of the original Word file

Hat tip: Special thanks to Ian Spick at Bradt Travel Guides for first alerting me to this technique.

Adapting and automating the process

If you’re given a project with a separate Word file for each chapter, however, it’s also soul-destroying to have to do this manually on each file individually, so creating an AppleScript droplet to batch process files was the obvious next step.

This also gave us the chance to fix other annoying problems, so the full workflow is:

  1. Open the Word file in Word
  2. Search and replace hidden characters that have caused problems in the past, and which for some reason I couldn’t search and replace in InDesign
  3. Accept all revisions (I’ve had both versions of the text come through in InDesign before now, if a tracked change is still pending)
  4. Convert any endnotes to footnotes (not such an issue with the latest InDesign, but still useful for earlier versions)
  5. Save as RTF (to import into InDesign)
  6. Save as PDF (Adobe Reader being more convenient than Word to refer to for formatting in lieu of hard copy if working digitally)
  7. Display a notification when done

and the AppleScript code inside the droplet is:

on open these_items
    set myScriptName to name of me
    set myFormattedDate to do shell script ("php -r 'echo @date(\"Y-m-d\");'")
    tell application "Microsoft Word" to launch

    repeat with this_item in these_items

        tell application "Finder" to set target_path to (container of this_item) as text
        set item_info to info for this_item
        set filename to text 1 thru ((length of name of the item_info) - (length of name extension of the item_info) - 1) of name of the item_info
        set my_output to target_path & filename & "." & myFormattedDate & ".rtf"
        set my_PDF to target_path & filename & "." & myFormattedDate & ".pdf"

        tell application "Microsoft Word"
            open this_item

            -- search and replace routine from
            set docRange to text object of active document
            clear formatting of find object of docRange
            execute find (find object of docRange) find text "^-" replace with "" replace replace all -- optional hyphen

            if (count of revisions of active document) ≥ 1 then accept all revisions active document

            set myEndnotes to (get endnotes of active document)
            if (count of myEndnotes) > 0 then endnote convert endnote options of active document

            save as active document file name my_output file format format rtf
            save as active document file name my_PDF file format format PDF
            close active document saving no
        end tell
    end repeat
    set myMessage to "Done!"
    display notification myMessage with title myScriptName
    delay 1 --> allow time for the notification to trigger
end open

To save this and use it on your own computer (Mac-only I’m afraid):

  1. Highlight and copy the script code above
  2. Open Script Editor (Applications > Utilities > Script
  3. Make a new file, if one hasn’t been started on opening Script Editor
  4. Paste the script code into the new file
  5. Select File > Save…
  6. Name the file “MS Word document prep” and set “File Format” to “Application”
  7. Save the file somewhere handy

To use it, just drag-and-drop one or more Word files onto MS Word document The RTF and PDF files will both be appended with a date stamp in the format 2018-07-01, and saved in the same folder as the original Word file.

A few things to consider:

Let me know how you get on, and I’ll post any updates here.

Share via Twitter

If you appreciate our input and would like to involve us in your next project, get in touch on or +44 (0)1246 271662.