Update (6-April-2016). — RichPaste 1.7 provides minor bug fixes regarding file management. Remember that the script file, RichPaste.jsx, must be installed as any other regular script—this is not a 'startup script.'

Update (12-Jan-2016). — RichPaste 1.6 brings important bug fixes (in particular those related to menu integration) and several improvements. The script is now localized in German thanks to my colleague Uwe Laubender who also provided valuable assistance in fixing the reported issues. Support for subscript and superscript attributes has been added. Oblique fonts are now recognized as italic variants.

How to install the update?

1. Quit InDesign.
2. Put the new version of RichPaste.jsx at the location of the existing file.
3. Restart InDesign.
4. Run RichPaste.jsx from the Scripts panel. (You may be prompted that a new version is installing.)
5. Done. You can close the Scripts panel and run RichPaste from either the Edit or the Right-Click menu.

The Problem

I am almost certain that every typographic designer has had to lay out such kind of material:

Not-so-fictitious example of an highly formatted text you were supposed to “copy-paste” into InDesign.

To turn into a real book a Word document so generously formatted (by an evil author) you usually have no choice but to remove all flourishes, then to apply the typographic rules of the publisher.

The problem is, erasing any formatting may also delete a substantial part of the content, since italics, and/or underlining, often contribute to the message in a way that cannot be regarded as purely cosmetic. 'Paste without formatting' will radically reset the original message:

Paste without formatting.

The Solution

Instead, it would be useful to selectively preserve some minimal formatting while preventing the target document from being altered by wild fonts, imported styles, and so on. A good balance could be something like this:

Paste “with some minimal formatting.”

That's the purpose of our script of the day: RichPaste. It offers a basic interface where you can select those minimal attributes you wish to preserve while rich-pasting into InDesign:

RichPaste Preferences.

The options speak for themselves. Use the Extra Font fields to preserve specific fonts (e.g. Arial-Regular), otherwise leave these fields empty. Your preferences are persistently stored—til you change them! Turn on the option “Do not show this dialog before pasting” to skip the setting stage when you execute RichPaste. You can still recall the Preferences dialog from either the right click menu, or from the Edit menu:

Calling the Preferences dialog from InDesign's Edit menu.

As you have noted a new menu item, Paste with formatting | RichPaste, has been added too. It also appears in the right click contextual menu, which provides a quick way to run the script from any selection or insertion point context:

Running the script from the right click contextual menu.

Note. — The first time you execute the script—that is, from the Scripts panel—it automatically sets up its menu system in InDesign so you won't need to call back the Scripts panel at all.

Installation.RichPaste being a regular JSX script, put it as usual in your 'Scripts Panel' folder and you're done. Behind the scene the script generates an additional startup file in order to manage the menus but that should be transparent to the user. (Do not put the script itself in a 'startup scripts' folder.)

Possible Issues

Various issues, or just unsatisfactory results, may occur depending on either your InDesign settings, font status/availability, or the inner state of the clipboard while the script is running. There are obscure cases—at least obscure to me!—where InDesign is simply unable to retrieve formatting or font styles from the clipboard even when the external application clearly supports rich text management through copy/paste.

RichPaste properly recovers embedded footnotes, but for the time being it does not deal with their original formatting attributes. In practice they should be composed with respect to your current footnote options, keeping in mind that InDesign has a long history of erratic behavior in this area!