Microsoft Outlook troubleshooting

In Outlook user has the ability to define all-day events. By default their reminder time is set to 18 hours prior to 00:00. If the user of MS Outlook works only with that application, it will not be a problem. However when synchronizing Outlook with a PDA, mobile phone or other device that has a built-in calendar, you can get a message reminding about the event in the middle of the night.

Luckily there is a way to change that without manually editing fields when you create a reminder. Simply use the macro code below.

Sub Check_all_calender_items_and_disable_reminder_if_set_to_18_hours()
    'Ruut Brandsma on 12/04/2007
    myNamespace = Application.GetNamespace("MAPI")
    Application.ActiveExplorer.CurrentFolder = myNamespace.GetDefaultFolder(olFolderCalendar)
    For Each item In Application.ActiveExplorer.CurrentFolder.Items
        With item
            If .Class = olAppointment Then
                If .ReminderMinutesBeforeStart = 18 * 60 And .ReminderSet Then
                    .ReminderSet = False
                    .Save()
                End If
            End If
        End With
    Next
    Application.ActiveExplorer.CurrentFolder = myNamespace.GetDefaultFolder(olFolderInbox)
End Sub

Sub Check_all_calender_items_and_change_18_hours()
    'OShon from VBATools.pl
    Dim item As Object
    With Application.GetNamespace("MAPI")
        Application.ActiveExplorer.CurrentFolder = .GetDefaultFolder(olFolderCalendar)
        For Each item In Application.ActiveExplorer.CurrentFolder.Items
            DoEvents()
            With item
                If .Class = olAppointment Then
                    If .ReminderMinutesBeforeStart = 18 * 60 Then
                        .Start = Format(.Start, "YYYY-MM-DD") & " 9:00" 'optional
                        .End = Format(.Start, "YYYY-MM-DD") & " 23:59"  'optional
                        .ReminderMinutesBeforeStart = 0 'option to allow different reminder time h * 60
                        .ReminderSet = True
                        .Save()
                    End If
                End If
            End With
        Next
        Application.ActiveExplorer.CurrentFolder = .GetDefaultFolder(olFolderInbox)
    End With
End Sub

 

© All rights reserved. No part or whole of this article may not be reproduced or published without prior permission.

Leave a comment

Fix Outlook
    Comment
Name

Organisation
Email address
Enter the sum of digits 5 and 4:
Notify me about new comments for this article (you need to provide a valid email address).