-
Solved: Create Weekly Meeting
I have a meeting that will need to be scheduled in outlook every week. However the participants in the meeting change based on who is on-call. I have setup a spreadsheet the shows week by week who is on-call and a macro that will determine which week we are on and send an e-mail to those who should be attending. However, I don't want to send an e-mail I want to send a meeting request.
My limited experience is failing me in my attempt to change the mail to a meeting request. Below I have included the code that is currently creating the mail.
[vba] Set OutApp = CreateObject("Outlook.Application")
Set OutMeeting = OutApp.CreateItem(olMeetingItem)
With OutMeeting
.To = stSendTo
.CC = ""
.BCC = ""
.Subject = stSubject
.Body = stBody
.Display 'or use .Send
.NoAging = True
End With
OutMeeting.Close (olSave)
Application.ScreenUpdating = True
Set OutMeeting = Nothing
Set OutApp = Nothing
[/vba]
I am thinking that I just need some added Properties to the OutMeeting Object. But I can not seem to find what properties to add to make it a meeting request.
Thanks!
-
Well, persistance pays off.... ALMOST. I have got the meeting request created and reoccurring. However, I seem to only be able to set the reoccurrance to Daily (including weekends). I really need it to be daily (excluding Saturday and Sunday) which there is a checkbox for this when creating the meeting reoccurrance manually. I would assume you can check this property with VBA but can find the property.
PLEASE HELP!!!
Again, my code is below.
[VBA] Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMeeting = OutApp.CreateItem(olAppointmentItem)
OutMeeting.GetRecurrencePattern
With OutMeeting
.RequiredAttendees = stSendTo
.Subject = stSubject
.Location = "Conference Room I"
.Start = #4/18/2008 9:00:00 AM# '<-- Needs Updated
.Duration = 15
.Body = stBody
.ReminderSet = True
.Display 'or use .Send
.NoAging = True
End With
Set RecurrPatt = OutMeeting.GetRecurrencePattern
RecurrPatt.RecurrenceType = olRecursDaily
RecurrPatt.PatternStartDate = Cells(iRow, cStart)
RecurrPatt.PatternEndDate = Cells(iRow, cEnd)
OutMeeting.Close (olSave)
Application.ScreenUpdating = True
Set OutMeeting = Nothing
Set OutApp = Nothing[/VBA]
-
-
Thanks JKWan. This did get me the information I have been searching for!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules