I've got a bit of an overload of "Unread or For Follow Up" items in Outlook at the moment => 149 to be precise. To tackle them I'm setting a "count down" schedule that is to finish by 1 October 2008. Every five days I need to make sure that the count is at or below the target number. I've popped my descending count into Outlook using the following PowerShell script.
$o = new-object -com Outlook.Application$mapi = $o.GetNamespace("MAPI")$cal = $mapi.GetDefaultFolder(9) # == olDefaultCalendar $d1 = [DateTime]"1 oct 2008"$d0 = get-date$ticks=$d1.Subtract($d0).Ticks*5/151 $n=150while ($n -ge 5) { $d0=$d0.AddTicks($ticks) $n-=5 $appt = $cal.Items.Add(1) # == olAppointmentItem $appt.Start = $d0 $appt.End = $d0 $appt.Subject = "({0})" -f $n $appt.AllDayEvent = $true $appt.ReminderSet = $false $appt.Save()}
$o = new-object -com Outlook.Application$mapi = $o.GetNamespace("MAPI")$cal = $mapi.GetDefaultFolder(9) # == olDefaultCalendar
$d1 = [DateTime]"1 oct 2008"$d0 = get-date$ticks=$d1.Subtract($d0).Ticks*5/151
$n=150while ($n -ge 5) { $d0=$d0.AddTicks($ticks) $n-=5 $appt = $cal.Items.Add(1) # == olAppointmentItem $appt.Start = $d0 $appt.End = $d0 $appt.Subject = "({0})" -f $n $appt.AllDayEvent = $true $appt.ReminderSet = $false $appt.Save()}
Remember Me
Page rendered at Monday, September 08, 2008 5:17:38 AM (Cen. Australia Standard Time, UTC+09:30)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.