How do I create a plain text email?

  • Thread starter Thread starter bruce
  • Start date Start date
B

bruce

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
 
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><H2>My HTML page.</H2><BODY><IMG
SRC=""WBHats.jpg""></BODY></HTML>"
.To = "(e-mail address removed)"
.attachments.Add "C:\temp\wb_logo\WBHats.jpg"
'.CC = "(e-mail address removed)"
'.Attachments.Add "C:\temp\011302.zip"
.Send
End With
End Sub

HT Really Isnt for Spamming, Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top