CraigLazar
asked on
create an html email in vb ?
Hi
at the moment my little app is creating a email in plain text, but
i need to be able to add fonts,colors, and mybe some small images into the body of the email.
Very similar to the html question notifications we receive from experts exchange on our questions -
thanks a
stack\
cheers
at the moment my little app is creating a email in plain text, but
i need to be able to add fonts,colors, and mybe some small images into the body of the email.
Very similar to the html question notifications we receive from experts exchange on our questions -
thanks a
stack\
cheers
Use CDONTS (or possibly CDO, as CDONTS is being phased out).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I use http://www.freevbcode.com/ShowCode.Asp?ID=109 to send HTML e-mails.
If you use Outlook you can try something like this:
Private Sub Command1_Click()
Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Appl ication")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = "someone@somewhere.com"
.Cc = "someoneelse@somewhere.com "
.Subject = "Hello......"
.Body = "This is the body of message"
.HTMLBody = "<H1>HTML version of message</H1>"
' .Attachments.Add ("c:\myFileToSend.txt")
.Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
Private Sub Command1_Click()
Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Appl
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = "someone@somewhere.com"
.Cc = "someoneelse@somewhere.com
.Subject = "Hello......"
.Body = "This is the body of message"
.HTMLBody = "<H1>HTML version of message</H1>"
' .Attachments.Add ("c:\myFileToSend.txt")
.Send
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
ASKER
hi guys
thanks a stack, sorry i have been hectic,
will get to it now
thanks
cheers
thanks a stack, sorry i have been hectic,
will get to it now
thanks
cheers
ASKER
Hi
so sorry been away and so busy,
i have this week to go thru this stuff, canu please leave the question open for this
week and i promise to close it up by the ned of the week
thanks so much
Sorry to the experts who have helped here
so sorry been away and so busy,
i have this week to go thru this stuff, canu please leave the question open for this
week and i promise to close it up by the ned of the week
thanks so much
Sorry to the experts who have helped here