ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Weekly email update (https://www.excelbanter.com/excel-programming/370367-weekly-email-update.html)

[email protected]

Weekly email update
 
Does anyone know how can I automate
an email of an excel workbook(attached)
to be sent out weekly?

Thanks!!
Michelle


Corey

Weekly email update
 
this link may assist you
http://www.cpearson.com/excel/ontime.htm
--
Regards

Corey
wrote in message
oups.com...
Does anyone know how can I automate
an email of an excel workbook(attached)
to be sent out weekly?

Thanks!!
Michelle




[email protected]

Weekly email update
 

Corey wrote:
this link may assist you
http://www.cpearson.com/excel/ontime.htm
--
Regards

Corey
wrote in message
oups.com...
Does anyone know how can I automate
an email of an excel workbook(attached)
to be sent out weekly?

Thanks!!
Michelle


Okay so here's this frankenstein code I patched together. I keep
getting an error about the Outlook.Appplication being not defined.

I'm wondering if I could put this code in an outlook project... but how
can I make it run if the workbook is closed?

GAR!


Sub Send_Msg()

Dim objOL As New Outlook.Application
Dim objMail As MailItem
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
If today() = "Saturday" Then
Exit Sub
Else
If today() = "Sunday" Then
Exit Sub
Else
If today() = "Monday" Then
Exit Sub
Else
If today() = "Tuesday" Then
Exit Sub
Else
If today() = "Wednesday" Then
Exit Sub
Else
If today() = "Thursday" Then
Exit Sub
Else
If today() = "Friday" Then
Application.OnTime ("24:00:00")

With objMail
.To = "
.Subject = "Project Status Report"
.Body = Range("A1:" & CurrentRegion)
.AddAttachment "C:\Sales\Projects
Status.xls"
.Display
End With
End If
End If
End If
End If
End If
End If
End If
Set objMail = Nothing
Set objOL = Nothing
End Sub

Any help would be great!, thanks!!! :)



All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com