Forum Discussion
Create Outlook meeting from Access VBA
So instead of
Set myMeeting = myOutlook.CreateItem(olAppointmentItem)
try
Set myMeeting = oFolder.Items.Add(olAppointmentItem)
- Jill_MarlowJan 18, 2022Copper Contributor
That worked! Thanks so much. I created a test event and it put it on UMC Event's calendar and not mine. The only glitch is, and this happened originally, is that the room is on the meeting twice. I'll have to look at the code more closely to see if the room is somehow being invited twice. Thanks again! MariaBarnes
- Jill_MarlowJan 18, 2022Copper ContributorI just figured it out. I had both .resources and .location which were set to the name of the room chosen in the form. I didn't need both, so I deleted the line with .location.
- Jill_MarlowJul 22, 2022Copper Contributor
As I said in my previous reply, the test I created was successful. I hadn't used the code since then. I tried another test because I added another criterion. Now when I run the code, it puts the meeting on the UMC Events calendar, but on the line .Send to send the invitation to the invitees and the resources, I get the following error:
Here is the code that is scheduling the meeting:
With myMeeting
.Resources = strLocation
.MeetingStatus = olMeeting
.RequiredAttendees = strInvitees
.Subject = strSubject
.Start = dteStartDate + dteStartTime
.End = dteEndDate + dteEndTime
.ReminderMinutesBeforeStart = 15
For Each oAccount In Accounts
If oAccount.DisplayName = "email address removed for privacy reasons" Then
.SendUsingAccount = oAccount
.Save
.Send
End If
Next
End WithI restarted Outlook as the error message suggested, but I still get the same error. Since I last used this code, I got a new computer which is running Windows 11 if that makes a difference. Does anyone know how to resolve this issue? Thanks.
Jill