View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default outlook htmlbody

I forgot to alter something.

NameValue(NAV_MESSAGE) & vbCrLf & sBody

is simple the path to the html file plus some additional text
eg
.HTMLBody = "C:\Demo.html" & vbCRLF & "Hello World!"

"Patrick Molloy" wrote:


Set objOutlook = New Outlook.Application
Set objEMailMsg = objOutlook.CreateItem(itemtype:=olMailItem)

'Show mail but don't actually send!
If sBody < "" Then
With objEMailMsg

.Subject = "P&P Summary for " & REPORTDATE

.HTMLBody = NameValue(NAV_MESSAGE) & vbCrLf & sBody

.Display

End With





"Erin" wrote:

From Excel VBA, I am creating an outlook email message. I want to have the
body contain an html file. Is there any way to load this html from a file,
instead of having to put into the VBA code?