Modify reminder day and date at once on multiple tasks and messages

Hi,

My aim is to follow up on similar items (task and/or messages) at the same moment.

After selecting a bunch of tasks/ messages in 'to do list' I'd like to be able to modify the reminder day and time in one shot for selected items.

I guess that if someone had the proper vba code, I could call it via a button to be set in task menu.

Regards,

Answer
Answer

(edited 3/21)

Sorry to be late replying but I tried and failed multiple attempts. Only today I hope I've made final progress.

With the code pasted below, I do manage to set reminder time and set start date =due date =reminder date for multiple tasks or messages or combinations of tasks and messages.

Further to your latest post I've probably added too many '.save'. But it should not hurt.

Latest code does correct an earlier small issue: display options for my to_do list show late items with red police. When setting new reminder time for a late mail item, red remained visible even if new start date is in two week time.

Now solved in code below

Option Explicit

Public Sub ModifierMultiplesRappels()
    Dim Session As Outlook.NameSpace
    Dim currentExplorer As Explorer
    Dim Selection As Selection
    Dim dtReminder
     dtReminder = InputBox("Entrer date et heure du rappel au format j/m/a h:m", "Entrer heure du rappel")
   
    Dim obj As Object
    Dim objItem As Object

    Set currentExplorer = Application.ActiveExplorer
    Set Selection = currentExplorer.Selection
    Set objItem = Selection.Item(1)

    For Each obj In Selection
 
    With obj
 
     Debug.Print .Subject
   
     If (TypeOf obj Is Outlook.MailItem) Then
     .ClearTaskFlag
     .MarkAsTask (olMarkNoDate)
     .TaskStartDate = dtReminder
     .TaskDueDate = dtReminder
     .ReminderTime = dtReminder
     .ReminderSet = True
     .Save
     ElseIf (TypeOf obj Is Outlook.TaskItem) Then
     .StartDate = dtReminder
     .DueDate = dtReminder
     .ReminderTime = dtReminder
     .ReminderSet = True
     .Save
     End If
    
     .Save
     End With
 
    Next

    Set Session = Nothing
    Set currentExplorer = Nothing
    Set obj = Nothing
    Set Selection = Nothing

End Sub

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 4, 2024 Views 1,226 Applies to: