Email Range Contents

  • Thread starter Thread starter Roy Harrill
  • Start date Start date
R

Roy Harrill

I would appreciate knowing how to email the contents of a named range as
email text, so the recipients see the text directly right when they open the
email message, i.e., NOT an attachment. VBA's SendMail and Route methods
send the entire workbook object, but I don't want to send the workbook. Can
this be done?
Roy
 
Roy,

This may help. Try brfore you use. This came from one of the MVP's site, but
cannot remember which.Note you must enter a E-Maill address where indicated.

HTH

Sub sendMymail()
Application.ScreenUpdating = False
Dim oConf As Object
Set oMsg = CreateObject("CDO.Message")
Set oConf = CreateObject("CDO.Configuration")
oConf.Load -1 ' CDO Source Defaults
Set Flds = oConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"your e-mail address"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
25
.Update
End With
With oMsg
Set .Configuration = oConf
.To = "your e-mail address"
.Subject = "Your message"
.TextBody = Sheet1.Range("a1")
.Send
End With
Set oMsg = Nothing
Set oConf = Nothing
End Sub
 

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