Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

VB Script Outlook Calendar on how to display a meeting invite using specific calendar

$
0
0
I have a vbscript that launches a meeting invite with some emails using the default calendar. I need to update the script to display the meeting invite using a specific calendar which resides on the same Parent folder (My Calendar) as the default calendar. Basically there are two Calendars under My Calendar folder. The top calendar seems to be the default calendar.
Here is the structure:
My Calendar



Somehow i need to figure out on how to display meeting invite with the Name@gmail.com calendar.

Code:

Sub btnClose_OnClick
                Window.Close
        End Sub
       
        Sub CreateICS(ToList)
       
                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 = ""
                        .Body = ""
                       
                        .Start = Now
                        .End = DateAdd("h", 1, .Start)
                         
                        ' make it a meeting request
                        .MeetingStatus = olMeeting
                        .RequiredAttendees = ToList
                        .OptionalAttendees = ""
                       
                        '.Send
                        .Display()
                End With
       
                Set objAppt = Nothing
                Set objOL = Nothing

        End Sub

Can someone please provide some guidance or direction on how start a meeting invite using specific calendar?

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>