[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Email a workbook/worksheet on schedule?

Zigball

12/12/2006 6:52:00 PM

Does anyone know how I could get a workbook/worksheet to automatical
email on a schedule?
Example: I want the workbook to be emailed on 9-30-2007, 10-31-2007
etc... every year do you know how this can be done?

Example Code:

Sheets(Array("Sheet1", "Sheet2")).Copy
'ActiveWindow.SelectedSheets.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "C:\Documents and Settings\"
.SendMail "email address here", _
"comment here"
.ChangeFileAccess xlReadOnly
'Kill .FullName
.Close False
End With

this the code I have.

1 Answer

R Doornbosch

12/12/2006 7:01:00 PM

0

I'm working on the same issue except it needs to be emailed at 8am each day.
In this case I think I'd use the MS scheduler to launch a macro that emails
the workbook. Have a look here

Previous copy and paste
"I would be inclined to do this via VBA... Take a look at Ron's site to see
how to Email...

http://www.rondebruin.nl/se...
--
HTH...

Jim Thomlinson"




"Zigball" <zigball@gmail.com> wrote in message
news:1165949528.784366.43590@73g2000cwn.googlegroups.com...
> Does anyone know how I could get a workbook/worksheet to automatical
> email on a schedule?
> Example: I want the workbook to be emailed on 9-30-2007, 10-31-2007
> etc... every year do you know how this can be done?
>
> Example Code:
>
> Sheets(Array("Sheet1", "Sheet2")).Copy
> 'ActiveWindow.SelectedSheets.Copy
> Set wb = ActiveWorkbook
> With wb
> .SaveAs "C:\Documents and Settings\"
> .SendMail "email address here", _
> "comment here"
> .ChangeFileAccess xlReadOnly
> 'Kill .FullName
> .Close False
> End With
>
> this the code I have.
>