Microsoft KB Archive/321690

= Custom AppointmentItem code does not run in MeetingRequestItem =

Article ID: 321690

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Office Outlook 2003, Service Pack 1 (SP1)
 * Microsoft Office Outlook 2003
 * Microsoft Outlook 2002 Standard Edition
 * Microsoft Outlook 2000 Standard Edition

-



This article was previously published under Q321690



SYMPTOMS
Microsoft Visual Basic Scripting Edition (VBScript) code in a custom AppointmentItem or TaskItem object does not run when the MeetingRequestItem or the TaskRequestItem object arrives in the recipient's Inbox. The MeetingRequestItem and the TaskRequestItem appear to be customized, but the code does not run.



CAUSE
When a customized appointment arrives in the Inbox, the message class changes from the custom message class of '''IPM.Appointment.  to IPM.Schedule.Meeting.Request''' (where  is the user-defined, published form name). Similarly, when a customized task request arrives in the Inbox, the message class changes from the custom message class of '''IPM.Task.  to IPM.TaskRequest''' (where  is the user-defined, published form name).

The AppointmentItem and the TaskItem data is bundled and is hidden in MeetingRequestItem and in TaskRequestItem such that the code does not exist directly in the MeetingRequestItem or the TaskRequestItem object. Although the form appears to be customized, the code does not run. The VBScript code cannot run because AppointmentItem and TaskItem are packaged. This behavior is a result of the design of MeetingRequest objects and TaskRequest objects.



WORKAROUND
You can create a custom Message form solution that simulates a MeetingRequestItem or a TaskRequestItem. Create a custom Message form that contains modifications that, when they are received, simulate a MeetingRequestItem or TaskRequestItem.

Alternatively, you can use the FormSwap utility to replace a standard form with a custom form that is based on the message class. For example, you can replace the IPM.Schedule.Meeting.Request form with '''IPM.Appointment. ''' (where  is the user-defined, published form name). The FormSwap utility is available from the Microsoft Office Resource Kit. To obtain the FormSwap utility, visit the following Microsoft Web site, and then click Download Now next to Formsadmin.exe:

Microsoft Office Resource Kit

http://www.microsoft.com/office/orkarchive/2000ddl.htm



STATUS
This behavior is by design.



Steps to reproduce the behavior
 Open a new Appointment form in Design mode. Hide the standard Appointment page. To do this, click to clear the Display This Page check box on the Tools menu. On the P.2 page, use the Field Chooser to add the Required Attendees, the Subject, and the Start fields.  Add the following code in the Script code window: Function Item_Open msgbox &quot;Open event fired&quot; End Function Sub Item_PropertyChange(ByVal Name) select case Name case &quot;Subject&quot; msgbox &quot;PropertyChange event fired&quot; end Select End Sub  Publish the form.</li> Open the form from the published location. Notice that the Open event fires.</li> Type the subject. Notice that the PropertyChange event fires.</li> Click Invite Attendees on the form.</li> Type an e-mail address in the Required Attendees box, type a start time in the Start box, and then click Send.</li> Open the meeting request from the recipient's Inbox. Notice that the Open event does not fire.</li> Change the text in the Subject box, and then press the TAB key to move out of the text box. Notice that the PropertyChange event does not fire.</li> Accept the meeting request, and then open the appointment from the Calendar. Notice that the Open event fires.</li> Change the text in the Subject box. Notice that the PropertyChange event fires.</li></ol>

<div class="references_section">