Forum Discussion
Create Outlook meeting from Access VBA
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 22, 2022Copper Contributor
I have another related question. I see that there are properties associated with a meeting that have to do with recurrence. How would I modify the code to include a recurrence of, say, the second Monday of every month until December of the current year? Jill_Marlow
- MariaBarnesJan 24, 2022MVPJill, you should be able to set the following items to make the meeting use a recurrence. This assumes you have already set the .Start to a 2nd Monday date. FYI the GetRecurrencePattern returns either a RecurrencePattern already setup or a blank object and then you can fill it.
Dim oRecurrence As Outlook.RecurrencePattern
Set oRecurrence = myMeeting.GetRecurrencePattern
With oRecurrence
.RecurrenceType = olRecursMonthNth
.PatternEndDate = "12/5/2022'
End With
Also see https://documentation.help/Microsoft-Outlook-Visual-Basic-Reference/olobjRecurrencePattern.htm for more info about different types of recurrence
- 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