Dismissing reminders before they are set to remind

  • Thread starter Thread starter R Avery
  • Start date Start date
R

R Avery

I have the following system set up:

I have a reminder to perform a certain task every workday at 9am. It
does not popup the reminder until 9am.

An Excel .OnTime event that automatically performs some action at 8am
every day (relies on an Excel instance being open, but I can safely
assume that for now). If that action succeeds, I want it to
automatically dismiss the reminder so that I won't be bothered by it.
But if it fails, I want it to allow the reminder to pass on to me so
that I know the task has not been completed.

I cannot set the system up such that if the task fails, it creates a
one-time reminder for 9am, because I cannot guarantee that Excel will be
open to perform the task.

The code to perform all steps will be in Excel, but that shouldn't make
a difference.


Is there anyway to accomplish what I want? Any help would be most
appreciated.
 
This doesn't make much sense. If you need Excel to be open to run your code
and all the code is in Excel then why can't you depend on Excel being open
to create a new item with a reminder on it if the task fails? The same code
that runs the task can create an item with a reminder set on it if the task
fails.

Aside from that, you can certainly get all items with reminders on them and
check to see which one is the one whose reminder you would want to clear.
However, if the code is running in Excel and Excel might not be running that
would be a problem.

To get all the items with reminders you could iterate the Tasks folder and
get each item in that folder that has TaskItem.ReminderSet = True, or set a
filter or restriction on the Items collection of the Tasks folder and
iterate the restricted Items collection or call the filter until you get the
item you want.
 
The reason I need to have Excel cancel the reminder rather than create
one if it the code fails is because sometimes Excel would not be open
and would not run anything (and therefore not create a reminder).

Also, I have implemented the reminder as something on my calendar, not
my tasks folder.
 
Back
Top