Hi Guys,
I'm trying to add a button that will add a meeting to MS Outlook.
Most of the code I have been able to find / scratch together is working.
But i'm having issues with the "TO" command as this wasnt in any code I could find. Any ideas?
I'm trying to add a button that will add a meeting to MS Outlook.
Most of the code I have been able to find / scratch together is working.
But i'm having issues with the "TO" command as this wasnt in any code I could find. Any ideas?
Code:
MRoom = DLookup("MeetingRoomEmail", "Tbl_MeetingRoom", "MeetingRoomID=" & Me.RoomID)
holonL = DLookup("HLEmail", "Tbl_HolonLeader", "HolonLeaderID=" & Me.HolonLID)
User = DLookup("Uemail", "Tbl_User", "UserID=" & Me.UserID)
HR = DLookup("HRemail", "Tbl_HR", "HRID=" & Me.HRID)
strInvitees = holonL & "," & User & "," & HR
Dim outApp As Object
Dim outMail As Object
Const olAppointmentItem = 1
Set outApp = CreateObject("Outlook.Application")
Set outMail = outApp.CreateItem(olAppointmentItem)
outMail.To = strInvitees
outMail.Subject = Me.MSubject
outMail.Location = MRoom
outMail.MeetingStatus = olMeeting
outMail.Start = Me.MDate + Me.MStartTime
outMail.End = Me.MDate + Me.MStopTime
outMail.ReminderMinutesBeforeStart = 30
outMail.ReminderSet = True
outMail.Display
outMail.Send
Set outMail = Nothing
Set outApp = Nothing