I was hoping someone could give me some advice. I’m struggling to build (of find examples on the KM forum of) a macro that will allow me to attach a specific file into a email and was wondering if you could help.
What I’m trying to do is create a macro which will automatically attach a specific word doc into an email (using Mac mail). Ideally I’d like to do this in the background so I don’t have to navigate away from the email. I’ve been playing with the ‘Copy File’ widget but I don’t think it’s the right approach as it needs a destination file to paste it to. I thought that I could use named clipboards but while they allow you to paste an image into them for later use they don’t seem to allow you to have a Word doc as a paste-able element.
To take you through what I’m hoping to achieve…
I open Mac Mail app and start composing a new mail.
I press a hot key. The macro copies a specified file from my desktop in the background and then pastes it into the mail. This will be the same file each time and so doesn’t need a dialogue box. I’ll assign different hot keys to different specified files
Does that make sense? Any pointers about which mechanism to use would be very welcome.
I do something like this in attaching customer invoices (first I download them to /tmp/url.pdf, and then I attach them, and the latter half is what you need to do).
Assuming the message window is open and Mail is at the front, this is the sequence I use. Basically, select Attach Files…, then use Command-Shift-G and type the file path in to select it, and then press return. Lots of pausing for the system to animate windows and keep up.
That’s tremendous. Thanks everyone - this is super helpful. I tried both Jimmy’s and Peter’s methods this morning and they both work very well. Jimmy’s has the advantage of being quicker, but Peter’s allows me to do it with the email already open and created.
It looks like Chris’ one is probably going to be the bees knees. I haven’t had a chance to install it yet, but I thanks so much for going to all the effort to put it together Chris. I’ll have a look at it this evening and let you know how I get on.
Cheers Chris. I’ve just tried it out and it works perfectly - it’s very cleverly done. This will be tremendously useful to me and save me a whole heap of time each week. I hope others find it as useful - I’d imagine there a are a lot of folks like me and Peter who regularly need to embed standard docs/pdfs in their mail.
I've just come across this and am glad (cause it means I'm on the right track!) that Peter doesn't have a better solution than what I was beginning to realise I would need to use. However, I have noticed that it simply doesn't work on my mac, and that was annoying.
After 10 minutes or so of googling what on earth could be going wrong with the ⇧⌘G hotkey in the open attachment dialog, I discovered that Lastpass.app was eating the shortcut. Lastpass has it assigned by default to generate password, but the window for that doesn't open because Mail has priority (I assume). Frustrating, but hopefully it might save somebody else some hassle to see this comment.