none
Help with User-Defined fields (outlook 2010) RRS feed

  • Question

  • Hi there.

    I have the following code adapted from this UserDefinedProperties.Add Method (Outlook).

    All works perfect apart from the 'Formula' UDF which I can't fathom.

    I want it to =Received (yes the standard Received column, and yes I have my reasons :)), but can't get my head around the code.  I dare say it's simple and I might very well kick myself but can anyone help?

    Many thanks,

    Dan.

    Sub AddUDFs()
     Dim objNamespace As NameSpace
     Dim objFolder As Folder
     Dim objProperty As UserDefinedProperty
     
     ' Obtain a Folder object reference to the Inbox default folder
     Set objNamespace = Application.GetNamespace("MAPI")
     Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox)
     
     ' Add five user-defined properties, used to identify and track customer issues.
     With objFolder.UserDefinedProperties
        Set objProperty = .Add("Received Date", olFormula, , [Received])
        Set objProperty = .Add("Started", olDateTime)
        Set objProperty = .Add("Finished", olDateTime)
        Set objProperty = .Add("CSO Name", olText)
        Set objProperty = .Add("Email Notes", olText)
     End With
    End Sub


    Monday, June 15, 2015 2:36 PM

Answers

All replies