Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Excel emailing from spreadsheet

I was wondering if there is a way I can include, in the subject field,
a reference number from the spreadsheet I am emailing. I am hoping to
acheive this in a similar way that the email address is sourced. Below
is a copy of the VB code I am currently using.

Dim WBname As String
' Dim Flds As Variant
Application.ScreenUpdating = False
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds

..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.xxxx.com.au"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25

..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")
= 1

..Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"xxxx"

..Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"xxxx"
.Update
End With
For Each ws In ThisWorkbook.Worksheets
If ws.Range("a1").Value Like "?*@?*.?*" Then
ws.Copy
Set wb = ActiveWorkbook
WBname = "c:/ NCF" & ws.Name & ".xls"
wb.SaveAs WBname
wb.Close False
Set wb = Nothing
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = ws.Range("a1").Value
.Bcc = "
.From = """xxx"" "
.Subject = "Loan Revaluation Drawdown Advice: "
.AddAttachment WBname
.TextBody = "Please see attached"
.Send
End With
Set iMsg = Nothing
Kill WBname
End If
Next ws
Set iConf = Nothing
Application.ScreenUpdating = True
Sheets("Register").Select

Thanks

Russell

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Excel emailing from spreadsheet

wrote:
I was wondering if there is a way I can include, in the subject field,
a reference number from the spreadsheet I am emailing. I am hoping to
acheive this in a similar way that the email address is sourced. Below
is a copy of the VB code I am currently using.

[cut]

Hi Russell,

try he

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

--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


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
Emailing a selection from Excel spreadsheet Tom K[_3_] Excel Discussion (Misc queries) 1 April 22nd 09 01:59 PM
emailing spreadsheet Kathy Excel Discussion (Misc queries) 0 July 29th 08 01:56 PM
Emailing a spreadsheet Chip Smith Excel Discussion (Misc queries) 1 June 7th 06 07:55 PM
emailing a whole spreadsheet AmyTaylor[_42_] Excel Programming 11 February 17th 06 11:20 AM
Emailing my spreadsheet? andycharger[_37_] Excel Programming 3 June 24th 04 02:59 PM


All times are GMT +1. The time now is 08:00 PM.

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

About Us

"It's about Microsoft Excel"