VBA CODE - CHAGNE MEETINGS DELAY REMINDER

  • Thread starter מיכ×ל (מיקי) ×בידן®
  • Start date
×

מיכ×ל (מיקי) ×בידן®

Hi,
I was looking for a Comprehensive way to automatically change the
reminder-delay-duration of a pre-selected bunch of Calendar meetings.
I came up with the herewith code but could not find the appropriate [if any]
way to ELIMINATE the reminder pop-up window, from popping-up, while the code
changes its delay time.
Any help at this point will be more than appreciated.
Mike
=========================================
Sub ChangeSelectedMeetingsRemindersDelay()
Dim objItem As Outlook.AppointmentItem
For Each objItem In Application.ActiveExplorer.Selection
If Not objItem Is Nothing Then
MsgBox objItem
objItem.ReminderMinutesBeforeStart = 15
objItem.Save
Else
MsgBox "Please select Meeting(s)"
End If
Next
Set objItem = Nothing
End Sub
=========
 
K

Ken Slovak - [MVP - Outlook]

You'd have to handle the Reminders.BeforeReminderShow() event, which has a
Cancel argument. Set that to True and the window won't open.
 
×

מיכ×ל (מיקי) ×בידן®

Thanks for your reply.
As far as I understand - setting the cancel argument to TRUE will disable
ALL future Reminders - or am I wrong !?
If my assumption is correct - then what I asked about was How to cancel ONLY
the ONE instance of the pop-up reminder [when my code is fired] - and, of
course, to allow ALL future reminders to pop-up as this is their role...
========================

Ken Slovak - said:
You'd have to handle the Reminders.BeforeReminderShow() event, which has a
Cancel argument. Set that to True and the window won't open.




מיכ×ל (מיקי) ×בידן® said:
Hi,
I was looking for a Comprehensive way to automatically change the
reminder-delay-duration of a pre-selected bunch of Calendar meetings.
I came up with the herewith code but could not find the appropriate [if
any]
way to ELIMINATE the reminder pop-up window, from popping-up, while the
code
changes its delay time.
Any help at this point will be more than appreciated.
Mike
=========================================
Sub ChangeSelectedMeetingsRemindersDelay()
Dim objItem As Outlook.AppointmentItem
For Each objItem In Application.ActiveExplorer.Selection
If Not objItem Is Nothing Then
MsgBox objItem
objItem.ReminderMinutesBeforeStart = 15
objItem.Save
Else
MsgBox "Please select Meeting(s)"
End If
Next
Set objItem = Nothing
End Sub
=========
 
K

Ken Slovak - [MVP - Outlook]

That event fires each time a reminder is due and the window is about to be
shown. You can decide if you want to cancel each reminder as it comes due.
So if you want to cancel display of only that one reminder you can do that,
if you want to cancel every reminder you can also do that.
 
×

מיכ×ל (מיקי) ×בידן®

Sorry - but I don't understand [maybe because poor English knowledge].
I don't see and/or understand how an one command Event-Macro can control 2
different situations.
Would you be so kind to present my Macro together with your suggested Event
Macro [which cancels ONLY the first pop-up reminder window [upon firing my
code in order to change the Reminder duration - but let ALL future reminders
to be displayed !?
Thanks.
============
Ken Slovak - said:
That event fires each time a reminder is due and the window is about to be
shown. You can decide if you want to cancel each reminder as it comes due.
So if you want to cancel display of only that one reminder you can do that,
if you want to cancel every reminder you can also do that.




מיכ×ל (מיקי) ×בידן® said:
Thanks for your reply.
As far as I understand - setting the cancel argument to TRUE will disable
ALL future Reminders - or am I wrong !?
If my assumption is correct - then what I asked about was How to cancel
ONLY
the ONE instance of the pop-up reminder [when my code is fired] - and, of
course, to allow ALL future reminders to pop-up as this is their role...
========================
 
K

Ken Slovak - [MVP - Outlook]

If you have an event handler that handler will fire every time the event
fires. In this case the event will fire every single time a reminder is due.
Setting the Cancel argument to True will prevent the reminder from firing
and will prevent the reminders dialog from appearing. Setting Cancel to
False or not setting it at all will let the reminder fire.

It's then up to you to decide if you want that specific reminder to fire.
Since the Reminders.BeforeReminderShow() event only provides a Cancel
argument and doesn't tell you which reminder would be firing it's up to you
to discover that and decide whether to let the reminder fire.

In the Reminders.BeforeReminderShow() event handler you would then get the
Reminders collection and iterate it, one item at a time and see which
reminder items were due or overdue by checking the Reminder.NextReminderDate
property and comparing it to the current date/time (Now). If the comparison
shows the reminder to be due you then decide if you want to let it fire by
using the Cancel argument.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top