Link to home
Start Free TrialLog in
Avatar of dustinjwivell
dustinjwivell

asked on

How to send an email in html format with SendObject?

Hi.

I can send mail using the SendObject Method, but I cannot send mail in an html format. Can someone tell me what I'm missing? Thanks. Here is my code.  I want to do this because I want to insert a long hyperlink that gets truncated if I send it in regular text. (unless there is a way to continue a hyperlink.) I'm sending to outlook. Thanks.!

    Dim strToWhom As String
    Dim strMsgBody As String
    Dim strMsgSubject As String
   
    strToWhom = "vern@mydomain.com"
    strMsgSubject = "Confirmation"
    strMsgBody = "<HTML><HEAD><TITLE></TITLE></HEAD><BODY><FONT face=Arial size=2><STRONG>" & vbCrLf
    strMsgBody = strMsgBody & "Thank You for using our service!<BR><BR>" & vbCrLf
    strMsgBody = strMsgBody & "Vern<BR>80 Main St<BR>Somewhere, TXC 11111<BR>V. 111.111.2222<BR>F.333.4444.4444" & vbCrLf
    strMsgBody = strMsgBody & "</STRONG></FONT></BODY></HTML>" & vbCrLf
   
    DoCmd.SendObject , acSendNoObject, acFormatHTML, strToWhom, , , strMsgSubject, strMsgBody, True
 
THANKS.
ASKER CERTIFIED SOLUTION
Avatar of dom_cath
dom_cath

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dustinjwivell
dustinjwivell

ASKER

Hi.

Thanks for the reply. I am using access 2000. Is the alternative (in code) to create a one page report, convert it to html and attach it using sendobject?

Thanks