Link to home
Start Free TrialLog in
Avatar of PIXADMIN
PIXADMINFlag for United States of America

asked on

Outlook 2003 Calendar Adjust to Daylight Savings Feature

I recently discovered that the Admin to the CEO of my company did NOT have the "Adjust to Daylight Savings" option checked off in the Time Zone settings in Outlook. As a result when I check it off all of her and HIS appointments after April 4th move an hour. I realize that I must have this setting enabled, my question is there a way for all the current appointments not to move an hour or is there way once they all move an hour for me to move them back?
Avatar of David Lee
David Lee
Flag of United States of America image

Hi PIXADMIN,

I don't know of a way to keep them from moving, but I know I can create a macro that'll set all appointments on or after Aril 4th back an hour.  If you're interested in that, then let me know and I'll post the code and isntructions for using it.

Cheers!
Avatar of PIXADMIN

ASKER

I would absolutely be interested in such a thing. By all means post the code for the macro that would be ideal.

Many Thanks!!
Ok.  I'll have it posted before the evening is out.
Hey Blue, I too would love to see that code.  Your own construction or did you adopt it and give it a good home?
My own code.
Ok folks, here's the macro.  Follow these instructions to use it. You'll need to do this on the Admin's computer and the CEO's computer
1.  Launch Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  In the Project pane, ff Modules isn't already expanded, expand it, then click on Module1.
4.  Copy the code below and paste it into the right-hand pane of the VB Editor
5.  Edit the day, month, and year values as needed.  Right now the code is set to adjust all appointments on or after 4/4/2005
6.  Edit the time adjustment as needed.  The code is currently set to back appointment times up one hour.
7.  Click the diskette icon on the toolbar to save the changes.
8.  Close the VB Editor.
9.  Click Tools->Macro->Security
10.  Set the Security Level to Medium.
11.  Run the macro.
12.  If needed, you can set the Security Level back to whatever it was after the macro is finished.

The code is very simple and straightforward.  It opens the default calendar folder and reads through the appointments checking each to see if the start date is on or after the specified date, currently 4/4/2005.  If the appointment meets the date test, then the code calculates a revised start time, currently one hour prior to the appointment's existing start time.  The appointment is then saved.  That's it.  Let me know if there's anything more I can do.  I wrote and tested this on a PC running Outlook 2002.  It worked exactly as described.

'Macro begins here
Sub SetAppointmentsBackOneHour()
    Dim olCalendar As Outlook.MAPIFolder, _
        olAppointment As Outlook.AppointmentItem, _
        datRevised As Date
    Set olCalendar = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar)
    For Each olAppointment In olCalendar.Items
        If Day(olAppointment.Start) >= 4 And Month(olAppointment.Start) >= 4 And Year(olAppointment.Start) >= 2005 Then
            datRevised = DateAdd("h", -1, olAppointment.Start)
            olAppointment.Start = datRevised
            olAppointment.Save
        End If
    Next
End Sub
'Macro ends here
SOLUTION
Avatar of Member_2_193590
Member_2_193590

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial