Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 30076

VBA to send pre-written email template with senders name in body of text

$
0
0

I send a lot of emails with an attachment with not much needed in the body of the text. Ideally I'd like a macro with a quick way of entering the following:

To FirstName

Please see attached.

Kind regards,

WillacyMe

All emails are structured FirstName.LastName@company.com.

I need a way to add FirstName to the body of a text.

I have added the following VBA code which opens up the template:

Sub QuickAttachementTemplate()

    Set temp = Application.CreateItemFromTemplate("C:\Users\WillacyMe\AppData\Roaming\Microsoft\Templates\AttachmentTemplate.oft")
    temp.Display
    Set temp = Nothing

End Sub

This just has a space to add the FirstName though, and I have to add the email after running the macro.

Is there a way to enter an email address in a new email and then run the macro?


Viewing all articles
Browse latest Browse all 30076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>