HTML to OFT conversion for E-Mail template

Create a Email template with HTML and save it on your desired place.
1. Open outlook hit Alt+F11.
2. Insert a Module.
3. Copy Paste the below code and replace the html path.

Sub MakeHTMLMsg()
Set objMsg = Application.CreateItem(olMailItem)
Set fso = CreateObject(“Scripting.FileSystemObject”)
Set ts = fso.OpenTextFile(“c:\template.htm”, 1)
strText = ts.ReadAll
objMsg.HTMLBody = strText
Set fso = Nothing
Set ts = Nothing
Set objMsg = Nothing
End Sub

4. Close and run the module. Your HTML is opened in Outlook as a template.
5. Save it as oft.
Enjoy.. 🙂

Print Friendly, PDF & Email

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.