• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Send outlook email templates using excel VBA

sn152

Member
Hi All,

Please help me with the below.

I have 7 different MS word templates. Every time I have to copy and paste these templates in outlook mail and edit and make some changes and send it to a group of email ids. Sometime while editing I miss some content or I copy paste wrong content.

To avoid this is there a way to send these templates from MS Excel using VBA without changing the format of the templates.

Thanks in advance!
 
You can thank @Chihiro for this,

http://stackoverflow.com/questions/...7-vba-using-an-outlook-template-set-variables

http://stackoverflow.com/questions/...il-template-body-replace-strips-out-html-form

http://excel-macro.tutorialhorizon....defined-template-from-ms-outlook-using-excel/

Also I will recommend that you post a sample file that will help.

You will need to create an outlook template and save with the extension of ".oft"

Code:
Sub OutlookTemplate()

Dim myolapp AsObject
Dim myitem AsObject

Set myolapp = CreateObject("Outlook.Application")
myolapp.Session.Logon
'Modify the link and title of the file to work with your example
Set myitem = myolapp.CreateItemFromTemplate("C:\test.oft")
myitem.Display 'or send
EndSub
Hope this help!
Cheers,
Karim
 
Last edited:
Back
Top