VBScript to create outlook appointment


I have a following vbscript which creates the outlook appointments at the specified time and date.

How do I add the time zone to it so that the appointment gets created based on the specified time zone.

Dim objOL   'As Outlook.Application
    Dim objAppt 'As Outlook.AppointmentItem
    Const olAppointmentItem = 1
    Const olMeeting = 1
    Set objOL = CreateObject("Outlook.Application")
    Set objAppt = objOL.CreateItem(olAppointmentItem)
    With objAppt
        .Subject = "Test"
	.Body = "Test"
        .Start = ("04/9/2010 8:00 AM")
	.End = DateAdd("h", 1, .Start)
        ' make it a meeting request
        .MeetingStatus = olMeeting
        .RequiredAttendees = "abc@xyz.com"
    End With
    Set objAppt = Nothing
    Set objOL = Nothing

Open in new window

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Patrick MatthewsConnect With a Mentor Commented:

The appointment will be created using whatever time zone that user has indicated in the Outlook calendar options is his/her primary time zone.

Shiva-KumarAuthor Commented:
True, but what i am looking for is a solution to specify the time zone while sending the request.

Patrick MatthewsConnect With a Mentor Commented:
There is no way to do that directly.  What you could do is adjust the start time of the appointment to reflect the time zone offset relative to the user's normal time zone.  That, however, is not necessarily straightforward because then you would have to take Daylight Saving Time / Summer Time into account.
Shiva-KumarAuthor Commented:
Thank u
All Courses

From novice to tech pro — start learning today.