Automated countdown in outlook calendar?

Experts,
I've finally set my last day in my current job (congratulations to me!), and I want to put a daily countdown in my Outlook Calendar (Office Prof. Ed. 2003 - 11.5608.5606). Ideally I would get a "XX work days left!" when I open outlook each morning. Work days vs. regular days not terribly important.

Clearly I can do this manually, but some sort of automation would be great! TIA!
goldbandAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David LeeCommented:
Hi goldband,

do you want it to appear as an event at the top of the daily calendar?

Cheers!
0
goldbandAuthor Commented:
That would be perfect!
0
David LeeCommented:
Here's the code for doing this.  Follow these intstructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Modules and click on Module1
4.  Copy the code below and paste it into the right-hand pane of the VB Editor
5.  Edit the code as needed.  I placed a comment before each line that needs to be edited
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools->Macro->Security
9.  Change the Security Level setting to Medium
10.  Run the macro.  Don't run it more than once or you'll end up with duplicate events.


Sub Countdown()
    Dim olkEvent As Outlook.AppointmentItem, _
        datDeparture As Date, _
        intDaysToGo As Integer, _
        intCounter As Integer
    'Enter your departure date on the following line
    datDeparture = #5/1/2006#
    intDaysToGo = DateDiff("d", Date, datDeparture)
    For intCounter = intDaysToGo To 0 Step -1
        Set olkEvent = Application.CreateItem(olAppointmentItem)
        With olkEvent
            'Edit the event subject ont he following line
            .Subject = IIf(intCounter = 0, "Last Day", intCounter & IIf(intCounter = 1, " day ", " days ") & "till I depart")
            .Start = datDeparture - intCounter
            .AllDayEvent = True
            .ReminderSet = False
            .Save
        End With
    Next
    Set olkEvent = Nothing
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.