Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert HTML into OFT format?

4,497 views
Skip to first unread message

Mark

unread,
Mar 17, 2008, 6:05:22 PM3/17/08
to
I have a newsletter template that I have created in an HTML authoring tool
(outside of Outlook 2007).

I now want to use the content as an Outlook template and want to know the
best way of converting the content into an Outlook .OFT format. I have tried
to cut/paste with no luck and can not work out how to access the code view
of the object.

- Puzzled!

Sue Mosher [MVP-Outlook]

unread,
Mar 17, 2008, 6:26:59 PM3/17/08
to
You can use the macro snippet in an Outlook VBA procedure to create a new message and load your HTML into it:

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

Once you have the message displayed you can use the Save As command to save it as an .oft file.

Note, however, that your HTML may or may not be suitable for an email message. You should to test it thoroughly with a variety of receiving email applications.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Mark" <mark_...@hotmail.com> wrote in message news:CB924E9C-FABA-4AA9...@microsoft.com...

prashan...@gmail.com

unread,
Dec 4, 2013, 10:35:26 AM12/4/13
to
Hi Guy,

It' very simple copy the html file and paste inside the outlook inbox then save in
outlook template (i.e oft extension)and click ok . Now oft file is ready.

pep.ema...@navitas.com

unread,
Nov 14, 2014, 12:06:51 AM11/14/14
to
Hi, i copied and pasted that script into VB but there is no 'save as' command anywhere, in File or Edit or any other menu item. Where are you going to click 'save as'?
0 new messages