Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|