Mail merge blank line Macro (v11.0.2)

This macro is a mail merge type macro. But each email that is made has a blank line on top. Is there a way to get rid of this?

I can find solutions using AppleScript. But not sure how to use the variables (EmailName, EmailSubject etc) with AppleScript.

Mail merge blank line.kmmacros (4.7 KB)

This has been a known issue with that Keyboard Maestro Action and Apple Mail for a while now. The below thread has some workarounds:

Tried the keystrokes suggestion. But that only works in a single Mail message window (whichever window is frontmost). I would then need to manually cycle through other Mail message windows to manually delete the extra lines.

Any other suggestions?

Unfortunately, no. This is an issue with Apple Mail and it's AppleScript/OSA support.

1 Like

No, because your macro's action leaves the email open and the frontmost Mail window. Make sure Mail is the active app before your "For Each" action and add the key strokes required to delete that unwanted first line to your loop.

1 Like

Not a huge fan of using keystrokes approach, as seem to break easily. But it does seem to be working for now. Thank you.

1 Like

Unfortunately you've little choice until Apple fix Mail's scripting so you don't get that empty first line -- it does the same when scripted via Shortcuts too, so you can't get round it that way...

1 Like