A visitor in Slipstick.com forums wanted to know how to view snoozed times in Tasks.
Sometimes I snooze such tasks, i.e. I might postpone it a day, or one or two weeks. Have looked thru the available fields, but I believe there is no such thing as 'Snooze' or 'Postpone' column?
Correct, there is not a Snooze column. Snoozes use the .NextReminderDate value which is stored in the reminder collection. You can get it using VBA or PowerShell.
The code below will create a new Post message with a list of all snoozed reminders, for Appointments, Tasks and Flags. If you need to send the list, you can write it to an email instead.
PowerShell to list Snoozed Reminders
$Outlook = New-Object -comobject Outlook.Application $oReminders = $Outlook.Reminders $RemItems = "" $remcount = $oReminders.Count for ($num = 1 ; $num -le $remcount; $num++) { $oReminder= $oReminders.item($num) If($oReminder.OriginalReminderDate -ne $oReminder.NextReminderDate) { $RemItems = $RemItems + "`r`n" + $oReminder.Caption + "`r`n`t" +"Original Reminder time: " + $oReminder.OriginalReminderDate + "`r`n`t" + " Snoozed to: " + $oReminder.NextReminderDate + "`r`n" } } $Mail = $Outlook.CreateItem(6) #mail is 0, post is 6 $now = Get-Date $Mail.Subject = "Snoozed Reminders " + $now $Mail.Body = $RemItems $mail.Save() $inspector = $Mail.GetInspector $inspector. Display()
Using PowerShell Scripts
To use PowerShell scripts with Outlook, start typing PowerShell on the start menu and open Windows PowerShell when it comes up. Windows PowerShell ISE has a script pane at the top, which is useful if you want to edit the script.
Paste the entire script in the PowerShell window and press Enter or the Run button if using PowerShell ISE. If you don't see the white code window in PowerShell ISE, click the Script button on the right that the red arrow is pointing to.
Note: PowerShell scripta will not work with the Windows Store version of Office. You'll need to use a VBA macro version if you have the Windows store version of Office installed.
Saving PowerShell Scripts
If you want to save the script as a .ps1 file, paste it into Notepad and save it with the extension .ps1. To open it in the PowerShell IDE, type powershell on the start menu and click on Windows PowerShell IDE when the PowerShell app is found. Paste the script in the editing window.
To use it, you need to allow local scripts by running this command:
Set-ExecutionPolicy RemoteSigned
To run your saved .ps1 file, right-click on the script and choose Run with PowerShell.
VBA to get the Snoozed Reminders
Sub SnoozedReminders() Dim oReminder As Reminder Dim oReminders As Outlook.Reminders Dim RemItems As String Set oReminders = Outlook.Reminders For Each oReminder In oReminders If (oReminder.OriginalReminderDate <> oReminder.NextReminderDate) Then RemItems = RemItems & oReminder.Caption & vbCrLf & "Original Reminder time: " & oReminder.OriginalReminderDate & vbCrLf & "Snoozed to: " & oReminder.NextReminderDate & vbCrLf & vbCrLf End If Next oReminder ' use olPostItem to create message. ' or olMailItem if you need to send it Set oMail = Application.CreateItem(olPostItem) 'Set oMail = Application.CreateItem(olMailItem) With oMail .Subject = "Generated on " & Now .Body = RemItems .Display .Save End With End Sub
List all Snoozed, Visible, and Upcoming Reminders
This version of the macro lists all snoozed reminders, all reminders visible in the reminder dialog, and all reminders for "Today". It will not list dismissed reminders.
Dim oReminder As Reminder Dim oReminders As Outlook.Reminders Dim RemItems As String Dim rCount As Long rCount = 0 Set oReminders = Outlook.Reminders For Each oReminder In oReminders ' If snoozed rCount = rCount + 1 If (oReminder.OriginalReminderDate <> oReminder.NextReminderDate) Then RemItems = RemItems & oReminder.Caption & vbCrLf & "Original Reminder time: " & oReminder.OriginalReminderDate & vbCrLf & "Snoozed to: " & oReminder.NextReminderDate & vbCrLf & vbCrLf ' If due by end of today ElseIf oReminder.OriginalReminderDate <= Date + 1 Then rCount = rCount + 1 RemItems = RemItems & rCount & ": " & oReminder.Caption & vbCrLf & _ "Original reminder " & oReminder.OriginalReminderDate & vbCrLf & vbCrLf End If Next oReminder ' can use olPostItem to create message. Set oMail = Application.CreateItem(olPostItem) 'Set oMail = Application.CreateItem(olMailItem) With oMail .Subject = "Generated on " & Now .Body = RemItems .Display .Save End With End Sub
How to use the macros on this page
First: You need to have macro security set to the lowest setting, Enable all macros during testing. The macros will not work with the top two options that disable all macros or unsigned macros. You could choose the option Notification for all macros, then accept it each time you restart Outlook, however, because it's somewhat hard to sneak macros into Outlook (unlike in Word and Excel), allowing all macros is safe, especially during the testing phase. You can sign the macro when it is finished and change the macro security to notify.
To check your macro security in Outlook 2010 and newer, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, look at Tools, Macro Security.
After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.
The macros on this page should be placed in a module.
Open the VBA Editor by pressing Alt+F11 on your keyboard.
To put the code in a module:
- Right click on Project1 and choose Insert > Module
- Copy and paste the macro into the new module.
- Click Run button to run the macro.
More information as well as screenshots are at How to use the VBA Editor