Access to Outlook Meeting Request

  • Thread starter Thread starter Joshua
  • Start date Start date
J

Joshua

Hello,

I am trying to figure out how to create a command where by the user can
click a form button and the information in the form will export out to
outlook meeting request and fill in the email address (based on email address
in the table) and allow the user to just click "send" in outlook.

Wow, that was a long sentence. :)

Thanks for any assistance.
 
If it's of help to anyone, I trolled the forms until I got enough to throw
this together. Now it works like a charm! I hope it might help someone else
out in the future.

___________________________________

Private Sub cmdOpenAppointment_Click()

Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer


Set objOApp = New Outlook.Application
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer

With objAppt
..RequiredAttendees = [Forms]![frmEvent_Part1_Details]![Audio Emails
Combined] & ";" & [Forms]![frmEvent_Part1_Details]![Lighting Emails Combined]
& ";" & [Forms]![frmEvent_Part1_Details]![Projection Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![StageHands Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Camera Emails Combined] & ";" &
[Forms]![frmEvent_Part1_Details]![Other Emails Combined]
..Subject = [Forms]![frmEvent_Part1_Details]![Name of Event] & " " &
[Forms]![frmEvent_Part1_Details]![Part Date Text]
..Importance = 1 ' Normal
..Start = [Forms]![frmEvent_Part1_Details]![Part Date Text] & " " &
[Forms]![frmEvent_Part1_Details]![Part Start Time Text]
..Location = [Forms]![frm All Events]![Part 1 Location]
..Attachments.Add "C:\Program Files\Microsoft Office\MEDIA\Report1.snp"
..Body = [Forms]![frmEvent_Part1_Details]![Additional Part Notes Text] &
vbCrLf & vbCrLf & vbCrLf
..MeetingStatus = 1
..ResponseRequested = True
..Save
..Send
MsgBox "Event Request Sent."
End With


Exit_btnSendItem_Click:
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Exit Sub

End Sub
 
Back
Top