Dougalsworld
Paul
- Local time
- Today, 13:29
- Joined
- Jul 29, 2005
- Messages
- 62

I'm hoping I can pick someones brains to solve what I think is probably a simple problem.
I am building a system that arranges training for people, and when we assign them to a course they are automatically sent a meeting request through outlook.
Now I've got all the tricky stuff working and I think this is my final hurdle...
My problem comes when trying to send to more than one contact. Currently I have the email contact list as a listbox on my form. I've looked across the forum and I've found instances were people have done something similar with standard email but I can't seem to adapt these for my use so I'm hoping by posting the code I'm using someone may have an idea
Private Sub Command21_Click()
' Save record first to be sure required fields are filled.
DoCmd.RunCommand acCmdSaveRecord
' Provide warning if meeting request already sent.
If Me!ReqSent = True Then
MsgBox "A meeting request has already ben issued"
Exit Sub
' Add a new meeting.
Else
Dim outobj As Outlook.Application
Dim outappt As Outlook.AppointmentItem
Set outobj = CreateObject("outlook.Application")
Set outappt = outobj.CreateItem(olAppointmentItem)
With outappt
.Start = [txtCourseDate] & " 09:00"
.Duration = [txtDuration]
.Subject = [txtSubject]
.MeetingStatus = olMeeting
Set myRequiredAttendee = .Recipients.Add(Me!lbxAddresses)
myRequiredAttendee.Type = olRequired
If Not IsNull("test") Then .Body = [txtBody]
If Not IsNull("BDU") Then .Location = _
"BDU"
.Recipients.ResolveAll
.Display
.Send
.Save
End With
End If
' Release the Outlook object variable.
Set outobj = Nothing
' Set the AddedToOutlook flag, save the record, display a message.
Me!ReqSent = True
DoCmd.RunCommand acCmdSaveRecord
MsgBox "Appointment Added!"
Exit Sub
AddAppt_Err:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description
Exit Sub
End Sub
Any help would be greatly appreciated