Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default E-mail from excel

Hi Ya'll,

I want to automate a daily task which gets some data from a SAP extract,
processes it, then mails a new file to a number of recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file created to a
predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default E-mail from excel

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

-----Original Message-----
Hi Ya'll,

I want to automate a daily task which gets some data from

a SAP extract,
processes it, then mails a new file to a number of

recipients.
I have done all the data stuff to the point where the new

files are
successfully created. How can I then (with VBA) e-mail

the file created to a
predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail

client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default E-mail from excel

Try looking up www.rondebruin.nl


"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP extract,
processes it, then mails a new file to a number of recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file created to

a
predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default E-mail from excel

John wrote:
Try looking up www.rondebruin.nl


"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP
extract, processes it, then mails a new file to a number of
recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file
created to a predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.


thanks fellaz


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default E-mail from excel

VBA can easily send mail via Outlook. Here is some example code

Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Dim objNameSpace As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
objNameSpace.Logon , , True

Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = _
objMailItem.Recipients.Add("bob.phillips@somewhere .com")
objRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.
objMailItem.Subject = "The extract has finished."
objMailItem.Body = "This is an automatic email notification"
objMailItem.Attachments.Add (Filename) 'you only need this if
'you are sending attachments?
objMailItem.Send

If you want to include an attachment as shown, it has to be a file not the
activeworkbook, so if you want to send the activeworkbbok, save it first,
and then send it as that file. You can use 'ActiveWorkbook.FullName' to
access it without using hard-coded values.

You just will need to add the code to trigger the mailing.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP extract,
processes it, then mails a new file to a number of recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file created to

a
predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default E-mail from excel

Bob Phillips wrote:
VBA can easily send mail via Outlook. Here is some example code

Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Dim objNameSpace As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
objNameSpace.Logon , , True

Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = _
objMailItem.Recipients.Add("bob.phillips@somewhere .com")
objRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.
objMailItem.Subject = "The extract has finished."
objMailItem.Body = "This is an automatic email notification"
objMailItem.Attachments.Add (Filename) 'you only need
this if 'you are sending attachments?
objMailItem.Send

If you want to include an attachment as shown, it has to be a file
not the activeworkbook, so if you want to send the activeworkbbok,
save it first, and then send it as that file. You can use
'ActiveWorkbook.FullName' to access it without using hard-coded
values.

You just will need to add the code to trigger the mailing.



"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP
extract, processes it, then mails a new file to a number of
recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file
created to a predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.


Thanks Bob, exactly what I was looking for

cheers

Damo


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default E-mail from excel

Bob I implemented this code in my workbook and it works like a charm.

The only change I made was to dynamically select the e-mail addresses from a
range in the workbook so that the administrator can type the addresses on
one of the worksheets rather that edit VBA.

thanks for your assistance.

Damien



Bob Phillips wrote:
VBA can easily send mail via Outlook. Here is some example code

Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Dim objNameSpace As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
objNameSpace.Logon , , True

Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = _
objMailItem.Recipients.Add("bob.phillips@somewhere .com")
objRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.
objMailItem.Subject = "The extract has finished."
objMailItem.Body = "This is an automatic email notification"
objMailItem.Attachments.Add (Filename) 'you only need
this if 'you are sending attachments?
objMailItem.Send

If you want to include an attachment as shown, it has to be a file
not the activeworkbook, so if you want to send the activeworkbbok,
save it first, and then send it as that file. You can use
'ActiveWorkbook.FullName' to access it without using hard-coded
values.

You just will need to add the code to trigger the mailing.



"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP
extract, processes it, then mails a new file to a number of
recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file
created to a predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default E-mail from excel

Damien,

Good move, that is the way I do it when I use it.

I also use DLs a lot with it.

Glad to be of help.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Damien McBain" wrote in message
...
Bob I implemented this code in my workbook and it works like a charm.

The only change I made was to dynamically select the e-mail addresses from

a
range in the workbook so that the administrator can type the addresses on
one of the worksheets rather that edit VBA.

thanks for your assistance.

Damien



Bob Phillips wrote:
VBA can easily send mail via Outlook. Here is some example code

Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Dim objNameSpace As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
objNameSpace.Logon , , True

Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = _
objMailItem.Recipients.Add("bob.phillips@somewhere .com")
objRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.
objMailItem.Subject = "The extract has finished."
objMailItem.Body = "This is an automatic email notification"
objMailItem.Attachments.Add (Filename) 'you only need
this if 'you are sending attachments?
objMailItem.Send

If you want to include an attachment as shown, it has to be a file
not the activeworkbook, so if you want to send the activeworkbbok,
save it first, and then send it as that file. You can use
'ActiveWorkbook.FullName' to access it without using hard-coded
values.

You just will need to add the code to trigger the mailing.



"Damien McBain" wrote in message
...
Hi Ya'll,

I want to automate a daily task which gets some data from a SAP
extract, processes it, then mails a new file to a number of
recipients.
I have done all the data stuff to the point where the new files are
successfully created. How can I then (with VBA) e-mail the file
created to a predefined set of recipients?
Using Excel 2k & Outlook 2k (with exchange) as the mail client.

Any help appreciated.

I have looked at this:
http://www.microsoft.com/exceldev/articles/bulkmail.htm
but I can't d/l the sample app.






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
How do I do an e-mail mail merge using an Excel spreadsheet? Gretchen Excel Worksheet Functions 0 July 19th 09 05:18 PM
E-Mail attachment to same e-mail address in Outlook Vick Excel Discussion (Misc queries) 4 May 17th 07 07:53 PM
E-mail to every e-mail address in an Excel column? MrMan&Fam Excel Discussion (Misc queries) 24 July 19th 06 09:35 AM
Error: cannot load the mail service. Check your mail installation. Brad Bowser Excel Discussion (Misc queries) 0 December 20th 05 10:03 PM
General mail failure when sending e-mail from Excel Adrienne Excel Discussion (Misc queries) 5 November 4th 05 12:59 PM


All times are GMT +1. The time now is 04:18 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"