I've got an Access VBA application that I want to create appointments from. I've used FreeBusy information to figure out when someone's available, now I need to send them an email notifying them that I've booked them. Plus I want to book the room at the same time.
This seems to work with the following VBA code. Except that I'm included in the meeting, and I don't want to be. So how can I do this?
I know how to scroll through a list of Mailboxes, find the right Mailbox, then add the Appointment Item to that folder (instead of my default Appointment folder). But I'd like to have a way of doing this without requiring everyone who uses the application to open every possible recipient's Mailbox.
Since I have 23 possible recipients + 6 meeting rooms, I thought maybe another way to do it would be to send the appointment request on behalf of the meeting room, then add the other person to the recipients list. That would only require having the 6 meeting rooms open from the user's Outlook. But still, I wonder if there's a way to do this without requiring that any of these other Mailboxes are open.
I thought there should be a way to remove me from the Recipients collection, but I'm not in the collection. Probably because it doesn't make logical sense to add something to my calendar, but then have me not attending.
Also, would any of this make any difference using a Meeting item instead of an Appointment item? The definition in the Outlook help I've seen about them is that a Meeting is an Appointment with a second person or a Room or Equipment, etc.
Any thoughts on this greatly appreciated.
Dim oApp As Outlook.Application
Dim oAppt As Outlook.AppointmentItem
Dim oRecipts As Outlook.Recipients
Dim oRecipt As Outlook.Recipient
Set oApp = CreateObject("Outlook.Application")
Set oAppt = oApp.CreateItem(olAppointmentItem)
.MeetingStatus = Outlook.OlMeetingStatus.olMeeting
.Subject = "Intake Appointment for " & Me.txtClientName
If Not IsNull(Me.txtRoom) Then .Location = Me.txtRoom
.Start = Me.txtDateTime
.End = DateAdd("n", Me.txtMinutes, .Start)
.ReminderMinutesBeforeStart = 5
.ReminderSet = True
.BusyStatus = Outlook.OlBusyStatus.olBusy
.IsOnlineMeeting = False
.AllDayEvent = False
' Add interviewer
Set oRecipts = oAppt.Recipients
Set oRecipt = oRecipts.Add(Me.txtInterviewer)
oRecipt.Type = Outlook.OlMeetingRecipientType.olRequired