Outlook Timing Macro

Status
Not open for further replies.

ScoBal

Member
Outlook version
Email Account
Exchange Server
Hi All,

I am hoping someone can help me with this query - It has been annoying me for weeks now. I have created an Outlook VBA code to send an email with an excel attachment to a sharepoint site. It works well and there have been no issues but I am now being asked for this doument to be sent every hour. The obvious solution would be have the macro set to auto run each time Outlook starts and use task scheduler to open Outlook every hour, but this would be clunky and could potentially cause sone issues. What I am ideally looking for is an Outlook equivalent to Excels "Application.OnTime" macro you can use to specify the time you want it to run. I am pretty new to this so dont know if such a thing exists!

Any help would be greatly appreciated.

Thanks,

Scott.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Outlook doesn't have an ontime function. you need to use windows calls - which requires more complicated code. If you use tasks scheduler you need to force outlook closed... which can create problems with the data file.

Another option is to do it from Excel and use the ontime macro. Both outlook and excel will need to be open for it to send, but pretty much the same code will work - you just need to reference outlook in the code.
 
Status
Not open for further replies.
Top