Create Outlook Email with Signature?

Hi all,

I have Outlook 2016/2019 (not sure which (version number is 16.48)) and I have a script for creating and sending emails. It all works but the issue is that the emails it creates don’t include any email signature. There appears to be a “signature” command in the Outlook AppleScript library but I cannot figure out what the proper syntax is.

Can anyone help?

Thanks,
hp

Hi. I just create the signature when creating the email. You should be able to use HTML to get whatever formatting you need.

Hi kerflooey,

I thought about that but there is a twist: the needed signature includes a graphic image which DOES need to be present. How would one code that?

Best regards,
hp

I think you may be able to convert the image to Base64 and insert that, but I’m not sure how to do that. I usually look at the full Outlook message code containing the image you want to output, and then reproduce that in the script.

Hi hp,

Outlook for Mac (especially versions like 16.48) does have limited AppleScript support, and unfortunately, the signature property in the AppleScript dictionary often doesn’t behave as expected. Many users have found that even when specifying a signature, it doesn’t apply when composing via script.

One workaround is to manually append your signature as HTML or plain text to the message body in the script. For example:

set mySignature to "<br><br>--<br>Best regards,<br>Your Name<br>Your Title<br>Your Company"
set theBody to "Hello," & mySignature

Then insert theBody into your email creation command.

It’s not ideal, but this is often the most reliable option until Microsoft improves AppleScript support for Outlook signatures.

While the signature command exists in the Outlook AppleScript dictionary, it doesn’t always behave as expected—especially in more recent versions like 16.48. One workaround is to manually insert your signature’s HTML into the message body rather than relying on Outlook to attach it automatically.

If you have your HTML email signature code saved somewhere, you can insert it at the end of your message content using AppleScript. Just make sure to set the content of the email using HTML formatting (you may need to adjust the content type accordingly). It’s not perfect, but it gives you full control over how your signature appears.