Posted 21 Days Ago Job ID: 2092447 13 quotes received

VBA Code to Create Meeting Request

Featured
Fixed Price or Hourly
Quotes (13)  ·  Premium Quotes (0)  ·  Invited (0)  ·  Hired (1)

  Send before: September 15, 2024

Send a Quote

Programming & Development Programming & Software

Would like to VBA Code in MS Access to create a meeting Request for a specific Calendar name in Outlook.


The following Code does the job, but creates the meeting request in the default calendar. Need it for a specific calendars.


Public Sub CreateMeetingInvite()

    Dim olApp As Outlook.Application

    Dim olMeeting As Outlook.AppointmentItem

    Dim olRecipient As Outlook.Recipient

    

    ' Initialize Outlook application

    Set olApp = Outlook.Application

    

    ' Create a new meeting request

    Set olMeeting = olApp.CreateItem(olAppointmentItem)

    

    ' Set meeting properties

    With olMeeting

        .Subject = "Meeting Subject Here"

        .start = #8/20/2024 2:00:00 PM# ' Set the start date and time

        .End = #8/20/2024 3:00:00 PM# ' Set the end date and time

        .Location = "Meeting Location Here"

        .Body = "Meeting body text goes here."

        .ReminderSet = True

        .ReminderMinutesBeforeStart = 15 ' Set reminder for 15 minutes before

        .BusyStatus = olBusy

        

        ' Add attendees

        Set olRecipient = .Recipients.Add("attendee@example.com")

        olRecipient.type = olRequired ' Required attendee

        

        ' Optional: Add additional attendees

        ' Set olRecipient = .Recipients.Add("optional@example.com")

        ' olRecipient.Type = olOptional ' Optional attendee

        

        ' Send the meeting request

        .Save

        '.Send

    End With

    

    ' Clean up

    Set olRecipient = Nothing

    Set olMeeting = Nothing

    Set olApp = Nothing

End Sub

... Show more
Jason B United States