Is there a way of progromatically creating 'Appointment RRS feed

  • Question

  • Hi

    Is there a way of programmatically creating 'Appointment - User Defined Fields In This Item' Dynamic collection of Outlook User Defined Properties.

    So far, it would appear that the fields need to be predefined.

    Are my original findings correct?

    Many thanks


    Wednesday, March 15, 2017 10:23 AM

All replies

  • Hello Stewart,

    The Outlook object model provides a single way for dealing with user defined fields.

    You can define custom properties by calling either the UserProperties.Add method for an Outlook item or folder, or theUserDefinedProperties.Add method for a folder.

    You can create a property of a type that is defined by the OlUserPropertyType enumeration, except for the following types: olEnumeration, olOutlookInternal, and olSmartFrom.

    To set for the first time a property created by the UserProperties.Add method, use the UserProperty.Value property instead of the SetProperties and SetProperty methods of the PropertyAccessor object.

    For example, a VBA sample code is listed below:

    Sub AddUserProperty() 
     Dim myItem As Outlook.ContactItem 
     Dim myUserProperty As Outlook.UserProperty 
     Set myItem = Application.CreateItem(olContactItem) 
     Set myUserProperty = myItem.UserProperties _ 
     .Add("Details", olText) 
     myUserProperty.Value = "Neighbor" 
    End Sub

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, March 15, 2017 11:18 AM