Keyboard Maestro 8.0.3 “Paste trimmed lines” Macro

UPDATE: I have removed the Remove Styles Action per input from @peternlewis

I work as a graphic designer and often need to paste multiple lines from Word to InDesign. Often from tables in Word to tables in InDesign.
But sometimes the lines have tabs, spaces or other whitespace at start or end.

This macro removes these for all lines in the clipboard and pastes it.

This macro is in a group, which only works in InDesign

Keyboard Maestro 8.0.3 “Paste trimmed lines” Macro

Paste trimmed lines.kmmacros (6.8 KB)

Looks good. There is no need to Remove Styles from a variable - variables are plain text, they have no styles, so styles are implicitly removed in your first action, Set Variable “Local__Text” to Text “%SystemClipboard%”.

1 Like