Outlook msg won't save as html or rtf only text
Outlook msg won't save as html or rtf only text
(OP)
HI I want to save a .msg file to html, I use Outlook 2010, If I open the message and save as html though Outlook it works absolutely fine but when I try to save a message to html or even rtf through vbscript is refuses to save as anything other than text, I have tried various different ways but with no joy:
Set olapp = CreateObject("outlook.application")
Set oNamespace = olapp.application.GetNamespace("MAPI")
Set oItem = oNamespace.OpenSharedItem("C:\1.msg")
oItem.SaveAs "c:\1.html", olhtml
oItem.Close olDiscard
Set oItem = Nothing
Set oNamespace = Nothing
I Have tried createfromtemplate not using MAPI
A host of different ways but nothing seems to work
Any help would be much appreciated THANKS
Set olapp = CreateObject("outlook.application")
Set oNamespace = olapp.application.GetNamespace("MAPI")
Set oItem = oNamespace.OpenSharedItem("C:\1.msg")
oItem.SaveAs "c:\1.html", olhtml
oItem.Close olDiscard
Set oItem = Nothing
Set oNamespace = Nothing
I Have tried createfromtemplate not using MAPI
A host of different ways but nothing seems to work
Any help would be much appreciated THANKS
RE: Outlook msg won't save as html or rtf only text
olHtml = 5
olDiscard = 1
Hope This Helps, PH.
FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?