Create HTML email message in th outbox

H

Harold Druss

Hi
I have never used the Outlook object model with VB6 before, so excuse my
ignorance. I'm trying to create a new email, insert the HTML file into the
body of the email and put it in the outbox for sending later.
Here is part of the code.

==============================================================

Dim ff As Long
ff = FreeFile
strFile = "C:\Program Files\Microsoft Visual
Studio\VB98\Projects\SummerTwi2\SummerTwi.htm"
Open strFile For Input As #ff
strHTML = Input(LOF(ff), #ff)
Close #ff
Debug.Print strHTML
strSubject = "Summer Twi"
strRecip = "(e-mail address removed)"
strMsg = "The Summer Twi Information"
If GetOutlook = True Then
Set mItem = mOutlookApp.CreateItem(olMailItem)
mItem.Recipients.Add strRecip
mItem.Subject = strSubject
mItem.HTMLBody = strHTML

mItem.Save
mItem.Send
End If
========================================================================

The email is in the outbox, but no html in the body.
Thank you
Harold
 
M

Michael Bauer

Hi Harold,

what version do you use and why do you think the mail format isn´t html?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top