I'm trying to set up a VBS to create a meeting in a specific calendar (not default) when a command button is pressed. The code I have works but creates the meeting in the default calendar. I've tried fooling around with it but I am new to VBS (mainly used VBA). I know VBA and VBS are similar so im sure something small has to be tweaked. I want the meetings to be placed in a calendar named Test, which is under My Calendars.
Sub commandbutton1_Click()
If CommandButton1 = False Then
Dim objOL 'As Outlook.Application
Dim objAppt 'As Outlook.AppointmentItem
Const olAppointmentItem = 1
Const olMeeting = 1
Const olFree = 0
Set objOL = CreateObject("Outlook.Application")
Set objAppt = objOL.CreateItem(olAppointmentItem)
objAppt.Subject = "My Test Appointment"
objAppt.Start = #8/24/17 3:50:00 PM#
objAppt.Duration = 1
objAppt.Location = "Followup"
objAppt.Body = "Test Verbiage"
objAppt.ReminderMinutesBeforeStart = 1
objAppt.BusyStatus = olFree
objAppt.Save()
Set objAppt = Nothing
Set objOL = Nothing
End If
End Sub