This is truly a neat macro. However, I prefer "ByPasting". So I tweaked it a little.
Based on @peternlewis's "Create Text Expansion From Selection Macro"
- Changed ByTyping to ByPasting.
- Added an action to set system clipboard to previous state.
- Changed "match any character" to "match after a word break".