SmartCellMerge script for InDesign CS4 and CS5+

SmartCellMerge.js is an InDesign script (CS4, CS5+) that automatically acts on the currently selected cells. By default it performs a row-by-row merge and inserts tabs between the joined elements:

SmartCellMerge in action.

Of course you can select as many columns as required, or restrict the targeted rows to a more specific region.

The cool thing is that you can also adjust the SmartCellMerge's settings through a small dialog box. To access this feature, simply execute the script with no active selection. Here are the default preferences:

SmartCellMerge default configuration.

In the Direction panel, select “Vertically…” to make the script merge rows while preserving columns.

In the Separator field, enter the character(s) that you want to be inserted between merged elements. Use the additional icon buttons to insert special character codes: {TAB} (tab character), {EOP} (end of paragraph), and {FLB} (forced line break).

Custom settings.

Press Save settings to confirm your choices. Note that these settings are application-persistent, which means that SmartCellMerge remembers them even once InDesign has been turned off and restarted.