Microsoft KB Archive/929593

= Known issues that may occur when you use the Outlook 2007 object model =

Article ID: 929593

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft Office Outlook 2007

-



INTRODUCTION
This article describes the known issues that may occur when you use the Microsoft Office Outlook 2007 object model.



Some methods no longer work in the Inspector_Close event or in the Item_Close event
In versions of Outlook that are earlier than Outlook 2007, a crash may occur if you use one of the following methods in the Inspector_Close event or in the Item_Close event:
 * The Inspector.Close method
 * The Item.Close method
 * The Item.Move method
 * The Item.Delete method

To prevent this problem, a design change was made in Outlook 2007 so that these methods no longer work in the Inspector_Close event or in the Item_Close event. When you try to use these methods in the Inspector_Close event or in the Item_Close event in Outlook 2007, you receive the following error message:

The item's properties and methods cannot be used inside this event procedure.

The Inspector.WordEditor property does not work in the NewInspector event
In Microsoft Office Outlook 2003, you can use the Inspector.WordEditor property in the NewInspector event. In Outlook 2007, the Inspector.WordEditor property does not work in the NewInspector event. To work around this issue, implement the Inspector.Activate event, and then use the Inspector.WordEditor property in the Inspector.Activate event.

The View.DisplayedDates property does not work
In Outlook 2007, the View.DisplayedDates property does not work.

The CalendarViewMode property does not work
In Outlook 2007, the CalendarViewMode property does not work.

The PropertyAccessor.GetProperty method returns an &quot;out of memory&quot; error
The PropertyAccessor.GetProperty method returns an &quot;out of memory&quot; error for a PT_BINARY property or for a PT_STRING8 property that contains more than 4 kilobytes (KB) of data. This issue occurs in the personal folder (.pst) file and in the offline folder (.ost) file for Microsoft Exchange Server. The 4 KB limit is a design limitation for the PT_BINARY property or for the PT_STRING8 property in the PropertyAccessor.GetProperty method. To work around this issue, use Extended MAPI if you must access large binary properties

The PropertyAccessor object does not support all MAPI property types
The PropertyAccessor object is not designed to support the following MAPI property types:
 * PT_CLSID
 * PT_CURRENCY
 * PT_MV_CLSID
 * PT_MV_CURRENCY
 * PT_MV_I2
 * PT_MV_I8
 * PT_MV_R4
 * PT_MV_SYSTIME

Additionally, the PropertyAccessor object generates an error if you try to use it to create or to retrieve one of these properties.

The OnDisconnection event is improved
In versions of Outlook that are earlier than Outlook 2007, the Quit event and the OnDisconnection event do not reliably determine when Outlook closes. In Outlook 2007, issues still occur when you use the Quit event. However, the OnDisconnection event is improved in Outlook 2007. Therefore, you should use the OnDisconnection event to determine when Outlook closes.

The olOfficeDocItemsType enumeration is deprecated
The olOfficeDocItemsType enumeration is hidden because Outlook 2007 no longer supports this functionality.

The DisableReadingPane property applies only to table views
The DisableReadingPane property is available only on table views. This is a limitation of the Outlook 2007 object model.

Conflicts in the rules object model may occur
Consider the following scenario. You use the Rules Wizard to change one or more rules, and you leave the Rules Wizard open. Then, a custom solution uses the Outlook object model to change the rules. In this scenario, you receive a warning message about the rules being in conflict. This behavior is by design. The changes that you make to the rules are saved only after you close the Rules Wizard.

The PropertyChange event does not occur for recipient properties
The PropertyChange event does not occur if you delete a recipient from a property that contains recipients. This issue also occurs in versions of Outlook that are earlier than Outlook 2007. To work around this issue if you are using a custom form, follow these steps:
 * 1) Add a custom field to the form.
 * 2) Set a formula so that the custom field is equal to the recipient-based property.
 * 3) Use the CustomPropertyChange event on the custom property.

This design limitation helps prevent potential performance issues.

Outlook 2007 may display a date if you implement an incorrect custom formula
If you implement an incorrect custom formula on a custom Outlook 2007 form field, Outlook may display a date instead of an error message or instead of a blank value. A date may also be returned in the object model if you use the UserProperty.Value property. To resolve this issue, correct the custom formula so that it returns the intended value.

Outlook 2007 incorrectly parses two forward slash marks
Outlook 2007 incorrectly parses a property name that contains two forward slash marks. When you use the PropertyAccessor object, Outlook 2007 changes the two forward slash marks to one forward slash mark. This issue occurs because of the way in which Outlook 2007 formats field names. To work around this issue, replace one of the forward slash marks with the following characters:

%2F

The BeforeAttachmentAdd event and the AttachmentAdd event do not occur
The BeforeAttachmentAdd event and the AttachmentAdd event do not occur if you insert an Outlook item attachment. This issue occurs only in Microsoft Visual Basic for Applications (VBA) because of the modal Insert Item dialog box. This issue does not occur in managed code.

An issue occurs if you use the GetDefaultFolders method and if you specify the undocumented parameter 15
If you use the GetDefaultFolders method and if you specify the undocumented parameter 15, a Reminders folder appears in the Outlook 2007 user interface. Do not use this enumeration together with the GetDefaultFolders method.

You cannot add a custom property if the property name matches a standard field
If you use the UserProperties.Add method to add a custom property to an item, you receive an error message if the name of the field matches any of the standard property names in Outlook. This behavior occurs even if the standard field is used on a different type of Outlook item. This is a design change from earlier versions of Outlook.

The HTMLEditor property is no longer functional
Outlook 2007 always uses Microsoft Office Word as the e-mail editor. Therefore, the HTMLEditor property is now hidden in the object library and always returns Nothing (Visual Basic) or Null (C++). If you have to manipulate the body of an item in Outlook 2007, use the WordEditor property. The WordEditor property returns a reference to the Word document by using the Word object library.

Keywords: kbhowto kbexpertiseadvanced kbinfo KB929593

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.