Bring back Outlook Reminder Window popup

So whilst chatting with Carly Bond over coffee she happened to mention to me that Outlook reminder windows never pop up to the front anymore, and instead just sit in the start bar and flash… Which is ok, unless you miss the first set of flashes – this then means you will potentially miss all future reminders, which is far from ideal.

At first I started messing with HWND’s and SetWindowPosition etc, which seemed to go ok – but then I realised, I am complicating it a bit! So A bit of hunting around on the net and a few hours of messing with code later gave me this solution

To implement this solution, launch outlook, press Alt+F11 on your keyboard, insert the code as per the screenshot below

Read More

Mass Outlook Calendar Cleanup

Over the last few weeks the company that I work for have been migrating from Google Apps over to Microsoft 365 for mail/calendar/contacts and unified messaging etc. This has not been without it’s challenges. Some have which have been fairly bizarre. This week I was approached by a member of our department who had somehow managed to end up with 10,000+ appointments of the same title in his calendar. We set about trying to remove them on mass using the Outlook GUI, but soon realised this would take a very long time. Which is when I put together the following snippet of VBA:

NB: This code ‘takes no prisoners, and straight deletes the appointments matching the criteria you pass it. This wouldn’t be easy to undue if you ran with incorrect parameters. I’d advise adding a break point and testing a few before letting it hit your entire calendar folder.

Dim myNameSpace As NameSpace
Dim myCalendar As Folder
Dim myAppts As Items
Dim myAppt As AppointmentItem
Dim i As Integer

Sub purge_cal()
    Set myNameSpace = Outlook.Application.GetNamespace("MAPI")
    Set myCalendar = myNameSpace.GetDefaultFolder(olFolderCalendar)

    Set myAppts = myCalendar.Items
    i = 0
    For Each myAppt In myAppts
        If myAppt.Subject = "" Then
            i = i + 1
            Debug.Print "Deleting " & myAppt.Subject

        End If
        Debug.Print i & " calendar items deleted"
End Sub

Read More

Delay Outlook mail sending

So today I was approached by an internet friend of mine Richard Tubb, he had a bit of a challenge for me. As a keen Ms Outlook user, he wanted to see if there was a way of delaying all emails that he’d composed and hit send on during the weekend to arrive on the next working day.

Of course, Ms Outlook has the built in deferred delivery time function.. However, setting that manually each time could easily become a bind. So that’s where this little Outlook VBA Snippet steps it.

The code checks to see if today is a weekday upon sending the email, and if it is either a Saturday or Sunday, it then finds the date of the next Monday, and sets the deferred send option to that Monday at 7AM. Of course, should Richard be sending mail through the week, Outlook will simply ignore the code. Simple really 🙂

EDIT: So Richard came back to me with a second request, to delay mail sent on a weekday by 30 minutes, I have now adjusted the code to suit.

If you find this code useful, or think you have a better way of doing this, drop me a line in the comments below!


Read More

Purge empty Ms Outlook Folders with VBA

I was recently spotted an opportunity to flex my VBA muscles when Richard Tubb posted a tweet, asking for solutions on how to clear out unused Microsoft Outlook folders.

I decided to accept the challenge, and threw together the following VBA Sub

As you can see from the code, this sub does exactly what is required. However, Richard threw me a bit of a curve ball and asked for it to be modified to allow the end user to choose there own folder to scan. Which is when I went back to the drawing board and came up with his little number:

This variation pops up Microsoft’s own ‘Folder Chooser’ allowing the user to choose their own starting point.

Hopefully someone will find this snippet useful.

Should you require assistance implementing this script, or modifying it please feel free to get in touch.

Read More

Reset permissions on outlook folders using VBA

Using the Redemption object you can use the following code to reset the permissions on a folders sub folders in outlook to leave the Default permissions.

Handy if you need to reset permissions on large numbers of folders.

Read More