Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Email Automatically with Outlook 1

Status
Not open for further replies.

jesternails

Programmer
Nov 23, 2003
3
US
I am trying to find a way to have outlook send an email at a fixed time each day. I already have a macro that I click that creates an email with an attachement, but I'd rather have it sent automatically. Any help would be greatly appreciated.
 
Hey,

I imagine there are several ways that you could do it. You could create a piece of code or macro and use the task scheduler to trigger it. Look up schedule in the Windows help or go to scheduled tasks in my computer. There is not much that you cant schedule.

Hope that helps.
 
You don't say where your macro resides, but if it's in an Excel workbook, one simple approach would be to put the code in the Open event of that workbook (or create a new workbook just for that purpose). The Task scheduler opens the workbook every day, and the email fires off when the workbook opens. You might also be able to get the code to close the workbook again when it's done (although that can be tricky - Excel balks sometimes when you try to make it pull the rug from under itself!).

VBAjedi [swords]
 
The macro resides in Outlook. I have outlook open at all times as well. Can a scheduled task kick off a macro in outlook while it is open?
 
hello,
i also want to send an email with an attachment automatically.
can u post your macro?
thanks in advance,
TaLz
 
This is the macro that I use. You can also add CC, BCC, Body, etc. I then add a "button" to my toolbar that runs the macro when I click it.


Sub sendmsg()

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Add("<recipient>")
myItem.Subject = "<subject>"
Set myAttachments = myItem.Attachments
myAttachments.Add "<path to filename>"
myItem.Display

End Sub
 
Is it possible to make Outlook send a message with a specific attachment if a mail with ceratin subject is sent?

Ex. I send a mail message with the word "SendMeTheA_report" in the subject field, then a rule should be triggered to send a reply with a file "A_report.xls" attached to the message...

How do I do this...?
 
Jesternails

"Can a scheduled task kick off a macro in outlook while it is open?"

Here is something you can do. Create a reoccuring item with a reminder set. Now put some code in the Reminder event that checks for the type of reminder and maybe something in the Subject. If all holds true, then you could fire off a macro. Then close the reminder window and turn off the alarm for that day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top