1

I have an Excel macro which creates an Outlook appointment. I can make everything work except I need to set the Time Zone as "Eastern". Some of my co-workers live in other time zones and I want to make sure the appointment is set at the correct time for them. Here is the code I currently have. How do I set the time zone to Eastern (US & Canada)?

Set objOL = CreateObject("Outlook.Application")
        Set objItem = objOL.CreateItem(1)
        With objItem
            .StartTimeZone = "Eastern"
            .Start = Range("B4").Text & " " & Range("C4").Text
            .End = Range("B4").Text & " " & Range("D4").Text
            .Body = "Centra Link: " & Range("K4") & vbCrLf & vbCrLf & " Phone: " & Range("I4") & vbCrLf & vbCrLf & "Lead facilitator:  " & Range("E4") & vbCrLf & "Co-facilitator:  " & Range("F4") & vbCrLf & vbCrLf & Range("MISC_HEADER") & ":  " & Range("H4")

            .Location = Range("I4") & ", Leader Code: " & Range("J4")
            .alldayevent = False
            .Subject = Range("A4")
            .ReminderMinutesBeforeStart = 30
            .ReminderSet = True
            .Save
        End With
Set objItem = Nothing
Set objOL = Nothing
MsgBox "An appointment has been created for " & Range("A4") & " on " & Range("B4"), vbOKOnly, "Calendar Appointment"
Community
  • 1
  • 1

1 Answers1

0

It is not that easy, as to say

.StartTimeTone = "Eastern"

look here: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._appointmentitem.starttimezone.aspx

you see, you would have to create a TimeZone object, like here

How to Modify Properties (Time Zone) of Recurring Appointments in Outlook 2010 VBA

look at the answear of siddharth rout.

Community
  • 1
  • 1
Jook
  • 4,564
  • 3
  • 26
  • 53