title: Retrieving custom property value from received mail using GetProperty (which was set using SetProperty in Outlook VBA)
body: <p>Reference:
  Outlook 2013
  Windows 8</p>
  
  <p>I have set a custom property on an outgoing mail using SetProperty.
  I am able to see this property and its value in the internet message header once the mail is received on another machine.
  I am not able to retrieve the value of this property using GetProperty even though, the property and its associated value exist in the received mail.</p>
  
  <p>Property is set using the code below :</p>
  
  <pre><code>Const SchemaPrefix As String = "http://schemas.microsoft.com/mapi/string/"
  Const SchemaCode As String = "{00020386-0000-0000-C000-000000000046}/ABC-ID"
  
  Dim pa As Outlook.PropertyAccessor
  
  Dim ID_Schema As String
  Dim ID_Value As String
  
  ID_Schema = SchemaPrefix &amp; SchemaCode
  ID_Value = "12345"
  
  Set pa = item.PropertyAccessor
  pa.SetProperty ID_Schema, ID_Value
  </code></pre>
  
  <p>In the mail received on another machine, I am able to see that the internet messager header contains :</p>
  
  <pre><code>ABC-ID: 12345
  </code></pre>
  
  <p>However, the following code fails, and returns the error -
  The property "<a href="http://schemas.microsoft.com/mapi/string/" rel="nofollow">http://schemas.microsoft.com/mapi/string/</a>{00020386-0000-0000-C000-000000000046}/ABC-ID" is unknown or cannot be found.<br>
  Error occurs on the last line : pa.GetProperty(ID_Schema)</p>
  
  <pre><code>Const SchemaPrefix As String = "http://schemas.microsoft.com/mapi/string/"
  Const SchemaCode As String = "{00020386-0000-0000-C000-000000000046}/ABC-ID"
  
  Dim pa As Outlook.PropertyAccessor
  Dim ID_Schema As String
  Dim objFolder As Folder
  
  ID_Schema = SchemaPrefix &amp; SchemaCode
  
  Set objFolder = Outlook.ActiveExplorer.CurrentFolder
  Set pa = objFolder.Items.item(1).PropertyAccessor
  MsgBox pa.GetProperty(ID_Schema)
  </code></pre>
  
  <p>In the test folder, there is only one email... and I am able to manually verify the existence of the custom property and its value as set on the sending machine</p>
  
  <p>Have found a few references on the web on how to set the property... but none on how to retrieve the property value. Guidance would be much appreciated.</p>