The information in this article applies to:
SUMMARYThe Microsoft Outlook 98 object library allows you to initialize a new variable as a particular type of item, such as in the following example: Dim MyContactItem As New Outlook.ContactItemHowever, this syntax should not be supported by the object model and may cause subsequent problems in the code you are creating for a solution. MORE INFORMATIONAll items should be created using the CreateItem or Items.Add methods. The following Visual Basic for Applications example illustrates how to properly early-bind a new object variable and then set it to a new item of a specific type. Be sure to reference the Outlook 98 object library before running this code.
NOTE: Although the syntax described in the Summary section of this article
may work in your solution, future versions of Outlook will not allow this
syntax. A compile error will be generated before the code is run.
REFERENCESFor more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base: Q180826 OL98: Resources for Custom Forms and Programming Additional query words: OutSol OutSol98
Keywords : kbdta OffVBS |
Last Reviewed: October 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |