View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default run a macro at a set time

Thanks for the quick reply. Does the nature of what I'm doing change your
mind or do you still think a vbscript is the right way to go? If so, I'd
presumably need to create the scheduled task programatically. How would I go
about doing that?

context of the problem:
There's a macro which runs when an e-mail is received. It locks up the
machine while it runs, so I'm giving the user the option to defer running the
macro for 5 mins, a bit like a reminder. As this is a relatively short time,
I'm not too worried about the user closing Outlook. Also the nature of the
task performed is such that I could have it run when outlook re-opens.



"keepITcool" wrote:
hmm..
and then the user closes outlook..
so the ontime wont work.

safer to create a vbscript and
run that as a scheduled task

Rob wrote :
I want to set a macro to run at a given time.

Application.OnTime 'does this in excel, but I can't find a way in
outlook. any help?

Also, I'd like to be able to pass a parameter to the macro, but that
doesn't seem posible. I'd get round this in excel by putting the
parameter in a cell somewhere, but I don't know where to store it in
Outlook.

Thanks in advance
Rob