-----Original Message-----
Was wondering, when composing a message to be sent via
CDONTS, is there away that I could embed a table into the
message. The info I need to put in the message would
best conveyed in tabular form, so wondering if there's
a way to do this??
Sure, here's an example:
Dim objNewMail
Dim strBody
Set objNewMail = CreateObject("CDONTS.NewMail")
strBody = "<html>" & vbCrLf
strBody = strBody & "<head>" & vbCrLf
strBody = strBody & "<title>Msg w/ Table</title>" & vbCrLf
strBody = strBody & "</head>" & vbCrLf
strBody = strBody & "<body>" & vbCrLf
strBody = strBody & "<table>" & vbCrLf
strBody = strBody & "<tr>" & vbCrLf
strBody = strBody & "<td>Whatever you want</td>" & vbCrLf
strBody = strBody & "</tr>" & vbCrLf
strBody = strBody & "</table>" & vbCrLf
strBody = strBody & "</body>" & vbCrLf
strBody = strBody & "</html>" & vbCrLf
objNewMail.From = "(e-mail address removed)"
objNewMail.To = "(e-mail address removed)"
objNewMail.Subject = "Dinner Invitation"
objNewMail.BodyFormat = 0 ' means HTML
objNewMail.MailFormat = 0 ' means MIME
objNewMail.Body = strBody
objNewMail.Send
Set objNewMail = Nothing
You might, however, want to take a look at the CDO.Message
object, which relaces CDONTS.NewMail and is present on
Windows 2000 and newer systems. CDO.Message has several
improved features, one of which is the ability to specify
an outgoing mail server.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------