Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html email using DoCmd.SendObject

Status
Not open for further replies.

kolorasta

Technical User
Jul 2, 2002
65
AR
Private Sub Command2_Click()
Dim strBody As String

On Error Resume Next
strBody = strBody + "<html>"
strBody = strBody + "<style type=""text/css"">"
strBody = strBody + "<!--"
strBody = strBody + "body {"
strBody = strBody + " font-family: ""MS Sans Serif"", Geneva, sans-serif;"
strBody = strBody + " font-size: 10px;"
strBody = strBody + " color: #000000;"
strBody = strBody + " background-color: #ffffff"
strBody = strBody + "}"
strBody = strBody + "a:link{"
strBody = strBody + " color: #009999;"
strBody = strBody + "}"
strBody = strBody + "a:hover{"
strBody = strBody + " color: #999999;"
strBody = strBody + "}"
strBody = strBody + "a:visited{"
strBody = strBody + " color: #009999"
strBody = strBody + "}"
strBody = strBody + "-->"
strBody = strBody + "</style>"
strBody = strBody + "<body>"
strBody = strBody + "<table width=""500"" cellpadding=""0"" cellspacing=""0"" >"
strBody = strBody + " <tr>"
strBody = strBody + " <td><img src=""strBody = strBody + " </tr>"
strBody = strBody + " <tr>"
strBody = strBody + " <td style=""font-family: ""MS Sans Serif"", Geneva, sans-serif; font-size: 10px; color: #000000; background-color: #ffffff; padding-left: 60px;"">&nbsp;</td>"
strBody = strBody + " </tr>"
strBody = strBody + " <tr>"
strBody = strBody + " <td><img src=""strBody = strBody + " </tr>"
strBody = strBody + "</table>"
strBody = strBody + "</body>"
strBody = strBody + "</html>"


DoCmd.SendObject , , acFormatHTML, email.Value, , , "FASTER, ahora todo es más rápido", strBody

End Sub

--------------------------

I have the above code and it doesn't work
I want to edit and email before it is sent... but I want it to show an HTML code first.... it´s like sending an email using a stationary... am I clear? If i´m not clear, tell me and i will try to be more explicit.

the above code show the email ready to edit in TXT format, showing the html source code.

Sorry for my poor english...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top