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

I have a program that runs overnight and finishes by updating a a Excel
spreadsheet.

I would like this updated spreadsheet automatically emailed to 3 people so
it is ready and waiting for them when they arrive for work.

That's what I would like to happen, is it possible .. if so how can I do it.
Can anybody point me in the right direction please ( I am using Excel 2003
and Outlook 2003)

I feel sure others must have gone down this route

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Is this possible ?

Everything you ever wanted to know about e-mailing from Excel but were afraid
to ask is here...

http://www.rondebruin.nl/mail/add-in.htm

Jim Thomlinson


"Robert Gillard" wrote:

I have a program that runs overnight and finishes by updating a a Excel
spreadsheet.

I would like this updated spreadsheet automatically emailed to 3 people so
it is ready and waiting for them when they arrive for work.

That's what I would like to happen, is it possible .. if so how can I do it.
Can anybody point me in the right direction please ( I am using Excel 2003
and Outlook 2003)

I feel sure others must have gone down this route

Bob



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Is this possible ?

Bob,

Here is some code that does it. You should save the workbook before using
this as attachmenst are retrieved from the HDD, not memory. Change the text
bits and email addresses to suit. Invoke like

SendWb Activeworkbook.FullName

Sub SendWb(wb As Workbook)

Dim oOutlook As Object
Dim oMailItem As Object
Dim oRecipient As Object
Dim oNameSpace As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True

Set oMailItem = oOutlook.CreateItem(0)
Set oRecipient = _
om")
oRecipient.Type = 1
Set oRecipient = _
")
oRecipient.Type = 1
Set oRecipient = _
oMailItem.Recipients.Add("the.underling@somewhere. com")
oRecipient.Type = 1
With oMailItem
.Subject = "The extract has finished."
.Body = "This is an automatic email notification"
.Attachments.Add (wb.FullName)
.Send
End With

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Robert Gillard" wrote in message
. uk...
I have a program that runs overnight and finishes by updating a a Excel
spreadsheet.

I would like this updated spreadsheet automatically emailed to 3 people so
it is ready and waiting for them when they arrive for work.

That's what I would like to happen, is it possible .. if so how can I do

it.
Can anybody point me in the right direction please ( I am using Excel 2003
and Outlook 2003)

I feel sure others must have gone down this route

Bob




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



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