antonyx
Arsenal Supporter
- Local time
- Today, 00:32
- Joined
- Jan 7, 2005
- Messages
- 556
hi, i need to get the syntax right for adding html tables to email templates in access..
the below code i am using is wrong.. can someone alter it or explain to me the correct syntax.. once i know i can use it freely
the below code i am using is wrong.. can someone alter it or explain to me the correct syntax.. once i know i can use it freely
Code:
Private Sub emailbutton_Click()
'References: Oulook Library
Dim strEmail, strSubject As String, strBody As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
strEmail = Me.emailadd
strBody = "<table border="0" id="table1" cellspacing="0" cellpadding="0"><tr> & _
<td><img border="0" src="http://www.londonheathrowcars.com/emaillogo.gif" width="560" height="113"></td> & _
</tr></table>" & _
"Make this <B>bold</B> and <BR>add a line."
strSubject = "Subject"
With objEmail
.To = strEmail
.Subject = strSubject
.HTMLBody = strBody
'.Send 'Will cause warning message
.Display
End With
Set objEmail = Nothing
End Sub