Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Email Range Contents

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Email Range Contents

Roy, have a look here

http://www.rondebruin.nl/sendmail.htm#Tips

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Roy Harrill" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Email Range Contents

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
"Roy Harrill" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Range Contents

For more info about CDO see
http://www.rondebruin.nl/cdo.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Charles Harmon" wrote in message ...
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
"Roy Harrill" wrote in message ...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving a range name AND Contents JMay Excel Discussion (Misc queries) 2 August 3rd 09 04:31 AM
a cell is set to email contents-cannot undo-changes my formatting Lindsay Excel Discussion (Misc queries) 3 August 31st 08 12:43 AM
compare the contents of one range of cells with the contents of a. Dozy123 Excel Discussion (Misc queries) 1 January 24th 07 10:14 AM
send email from cell contents gall Excel Discussion (Misc queries) 0 February 20th 05 03:41 PM
Excel contents to Outlook email Mohan Manicks Excel Programming 2 December 13th 03 01:28 AM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"