PC Review


Reply
Thread Tools Rate Thread

Changing appointment to AllDayEvent,. Recipients get meeting request for specific tim

 
 
New Member
Join Date: Jul 2011
Posts: 2
 
      14th Jul 2011
I want to do the following with a submitted meeting request:
1) Change appointment to AllDayEvent=True (seems to clear out the time portion of Date field) and BusyStatus=Free so recipients see the event at the top of their calendar without being blocked
2) Create an appointment with time originally submitted in meeting request BusyStatus=Busy to block users own calendar.

I am successfully creating new appointment and the changes appear successful in the meeting. The items are correct in my calendar. However, the meeting request goes to the recipients with the original time.

Here is what I am doing:

'Only applies to new Meeting Requests
If Item.MessageClass = "IPM.Schedule.Meeting.Request" Then

Dim meeting As MeetingItem
Dim appt As AppointmentItem
Set meeting = Item
Set appt = meeting.GetAssociatedAppointment(False)


'Does this have a OOO/WFH custom property set?
'This property is set by another macro.
If Not (appt.ItemProperties.Item("OOORequest") Is Nothing) And appt.ItemProperties("OOORequest") Then

Dim olApp As Outlook.Application
Dim new_appt As AppointmentItem
Dim newStart As Date
Dim newEnd As Date

Set new_appt = Outlook.Application.CreateItem(olAppointmentItem)

'If recurring meeting, duplicate recurrence pattern for new appointment
If appt.IsRecurring Then

Dim RPOrig As RecurrencePattern
Dim RPNew As RecurrencePattern

Set RPOrig = appt.GetRecurrencePattern
Set RPNew = new_appt.GetRecurrencePattern
RPNew = RPOrig

End If

'Save dates
newStart = appt.Start
newEnd = appt.End

'Reset original appointment Date properties to dates only (no times)
Dim strDate As String
strDate = CStr(DatePart("m", newStart)) + "/" + CStr(DatePart("d", newStart)) + "/" + CStr(DatePart("yyyy", newStart))

'Set Meeting request to not bother other users
With appt
'.Start = CDate(strDate)
'.End = CDate(strDate)
.ReminderSet = False
.AllDayEvent = True
.BusyStatus = olFree
.ResponseRequested = False
.ForceUpdateToAllAttendees = True
.Save
End With

meeting.Save
meeting.Send

With new_appt
.Subject = appt.Subject + " appt"
.BusyStatus = olOutOfOffice
.ReminderSet = False
.Start = newStart
.End = newEnd
.Save
.Send
End With

'Release resources
Set new_appt = Nothing
Set olApp = Nothing
End If

'Release resources
'Set meeting = Nothing
'Set appt = Nothing
End If


End Sub
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jul 2011
Posts: 2
 
      20th Jul 2011
Turns out that problem is the ItemSend event passes in the Meeting object by value which means that I cannot update it. I have since moved to the AppointmentItem.Send event and things are working better.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Meeting request changes to Appointment Jaywant Microsoft Outlook Calendar 1 31st Jul 2009 05:11 AM
Meeting Request goes to more recipients than those invited =?Utf-8?B?QW5kcmV3?= Microsoft Outlook Calendar 2 29th Nov 2005 11:18 AM
Forwarded Meeting Request Does Not Appear on Recipients Calendar Michael.Lawlor@gmail.com Microsoft Outlook 0 11th Apr 2005 05:11 PM
Hide recipients on meeting request?? dms Microsoft Outlook Calendar 2 2nd Sep 2004 07:22 PM
Meeting Request - Invalid E-mail to Recipients Mark Pfeifer Microsoft Outlook Calendar 0 20th Oct 2003 03:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 PM.