Copying and Pasting Multiple Email Addresses

I often need to copy 15 different email addresses and paste them 15 different times. Also with a comma and space between each one.

Is there a better way I can paste all these in rather than having to hit “cmd + v, comma, space” 15 different times?

Hey @lammers01,

  • Where exactly are you performing this task?
  • Are they always the same 15 email addresses?
  • Can you format them appropriately and paste them all at once?


• Copying them from various parts of a multi page PDF (not consistently in the same place each time I perform this task)
• All different email addresses
• Not sure what you mean :slight_smile:

Where are you pasting them?

Into a Safari text field

This is a very simple proof-of-concept set of two macros.

  • Download the macros and import the macros by double-clicking in the Finder.
  • Make certain sure the macros and their container macro-group are enabled.
    • They are uploaded in a disabled state.

You run macro one before copying any email addresses. It sets the clipboard to "••••••••••••••••••••" which is a marker used by the second macro.

Once you're done copying email addresses:

  • Place the cursor in the Safari field where you want to paste.
  • Activate the macro.
  • All copied email addresses will be pasted at once with proper delimiters.

NOTE – in addition to the two macros I've provided you'll want to create an Activate Clipboard History Switcher macro (if you don't have one already), so you can eyeball the Clipboard History at need.

See these:

Download: Test Group.ccstone Macros.kmmacros (14 KB)


Look over the macros to see how they work.

For a production macro I would add some goodies like trimming whitespace.

I might also put a palette on screen to remind me that I was in Copy Email Addresses Mode.

My macros leverage the already existing Keyboard Maestro History.

There are other ways to do this job, but this is convenient – since all you have to do is remember two hotkey triggers and be able to use the macOS copy function.

If you're not already using the Clipboard History Switcher or another Clipboard Manager you really want to check it out. It's a game changer.

Ha! I did this the hard way...

There's a Clipboard History collection available that would have let me simplify a bit by using a For-Each action instead of the While.

I may revisit that later today if I have time.


Okay, for fun I came back to this to try out a different method.

This time I'm using the Clipboard-History-Collection in a For-Each action, and I'm matching against an email address RegEx pattern in a Switch action. This macro is more strict about checking for a genuine email address instead of just an @ symbol.

I'm still using "••••••••••••••••••••" as a marker in the clipboard history, but I'm leaving it in the history after deleting the copied email addresses – just in case the user wants to copy and paste another round of addresses.

You can prevent the copied email addresses from being deleted from the clipboard history by disabling the last Repeat action.

I added a Notification to the Initializer macro, so the user has a confirmation that it's all set to go.

This little exercise was fun, and there are still more ways one could go about it.  :sunglasses:


Download: Test Group.ccstone Macros.kmmacros (16 KB)


Amazing!! Thanks Chris. Love your passion and time you’ve taken to help. I’ll investigate further.

Prior to receiving your msg I did have a bit of success with this very simple alternative macro. It's very basic, but quite effective....

I also need to investigate the Clipboard History Switcher. Haven't really played around with this much yet. I hear everyone raving about it though. Off the top of your head, do you have any specific use cases for it that make it such a game changer?

It's not possible to convey how much a clipboard history type utility improves productivity...

I use LaunchBar, and it has a clipboard history. The way it searches is weird, but it's very useful.

I can capture text an images and paste then when and how I want to without being limited by the macOS's silly single pasteboard.


Keyboard Maestro's Clipboard History has a more straightforward string search, and that can help me find something I've lost in LaunchBar.

I also keep KM's LBH pretty big, and this has saved me from myself many times – i.e. I've deleted some code or something I've worked hard to produce and was able to retrieve it only because I had my history.


I could manage to do your copy email address and paste with commas strictly with KM's CHS, because it can paste multiple items at once with a chosen delimiter.

I could go on and on. I use the clipboard history every time I use my Mac.