How do I create a plain text email?
Here you go
Option Explicit
Dim ol, MailSendItem, olns, olMailItem
Dim today As Date
Dim mySubj, myAddr, myBody, myAttachments
Dim myFile
Sub NewMail()
Set ol = CreateObject("Outlook.Application")
Set MailSendItem = ol.CreateItem(olMailItem)
Set olns = ol.GetNamespace("Mapi")
mySubj = Range("B2")
myAddr = Range("D2")
myBody = Range("A1")
With MailSendItem
.Subject = mySubj
.Body = myBody
'.htmlbody = "<HTML<H2My HTML page.</H2<BODY<IMG
SRC=""WBHats.jpg""</BODY</HTML"
.To = "
.attachments.Add "C:\temp\wb_logo\WBHats.jpg"
'.CC = "
'.Attachments.Add "C:\temp\011302.zip"
.Send
End With
End Sub
HT Really Isnt for Spamming, Greg
"bruce" wrote in message
news:oLSjc.38630$YP5.2951326@attbi_s02...
In the past, I have created a HTML email, but I am looking to create a
plaint text email.
For arguments sake, lets say thier name is at loction offset (0,1) email
address is at offset(0,5) and the meat is on worksheet email location e1.
Before I had read a file in and stuff, I had tried the same approach, from
what I remember (code is lost), but I had no luck porting it over to plain
text. I am not sure what the properties I need are...
I am using Outlook 2002 as my mail program
Excel 2002.
THIS IS NOT for SPAMMING!
Thanks
Bruce
|