Export (0) Print
Expand All

http://schemas.microsoft.com/mapi/ Namespace

Exchange Server 2003

http://schemas.microsoft.com/mapi/ Namespace

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The http://schemas.microsoft.com/mapi/ namespace is used to directly access MAPI properties in the Microsoft® Exchange store. The namespace consists of three sub namespaces: proptag, id, and string. The following table shows these subnamespaces and their descriptions.

Sub Namespace Description
proptag This namespace is used to access Messaging Application Programming Interface (MAPI) properties in the Exchange store. You can access these properties through an OLE DB or through WebDAV by appending the hexadecimal property tag value to the namespace prefix:

http://schemas.microsoft.com/mapi/proptag/value

The hexadecimal value should follow the character "x" in the name. For example, the PR_SUBJECT Messaging Application Programming Interface (MAPI) property can be accessed using the name http://schemas.microsoft.com/mapi/proptag/x0037001E.

The full property tag value must be used.

id This namespace is used to access id-named Messaging Application Programming Interface (MAPI) properties in the Exchange store. You can access these properties through an OLE DB or through WebDAV by appending the namespace globally unique identifier (GUID) in string format for the property set followed by the hexadecimal identifier for the property:

http://schemas.microsoft.com/mapi/id/{propset GUID}/value

For example,

http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/xfeedface

string This namespace is used to access string-named Messaging Application Programming Interface (MAPI) properties in the Exchange store. You can access these properties through an OLE DB or through WebDAV by appending the namespace GUID in string format for the property set followed by the name (string) of the property:

http://schemas.microsoft.com/mapi/string/{propset GUID}/name

For example,

http://schemas.microsoft.com/mapi/string/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/myproperty

Visual Basic

Dim Rec as New ADODB.Record
Dim Flds as ADODB.Fields
Dim oConn as ADODB.Connection 

' assume we have the URL to an item in
' a public folder. Assume further that string-named
' properties exist for it and are set using some MAPI form
' The namespace for the property set will be 
' {3f0a69e0-7f56-11d2-b536-00aa00bbb6e6} 
' and the properties are called 
' prop1,prop2, and prop3. Each property is a string

Dim strProp1 as String
Dim strProp2 as String
Dim strProp3 as String

oConn.Provider = "ExOLEDb.DataSource"
oConn.open "http://server/public/public folders/somefolder/" 

Rec.Open "http://server/public/public folders/somefolder/item3.eml", oConn, adModeReadWrite

Set Flds = Rec.Fields

strProp1 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop1").Value

strProp2 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop2").Value

strProp3 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop3").Value

VBScript

Dim Rec
Dim Conn 
Dim Flds

Set Rec = CreateObject("ADODB.Record")
set Conn = CreateObject("ADODB.Connection") 
Conn.Provider = "ExOLEDb.DataSource"
Conn.open "http://server/public/public folders/somefolder/"
' assume we have the URL to an item in
' a public folder. Assume further that string-named
' properties exist for it and are set using some MAPI form
' The namespace for the property set will be 
' {3f0a69e0-7f56-11d2-b536-00aa00bbb6e6} 
' and the properties are called 
' prop1,prop2, and prop3. Each property is a string

Dim strProp1
Dim strProp2
Dim strProp3

Rec.Open "http://server/public/public folders/somefolder/item3.eml", Conn , adModeReadWrite

Set Flds = Rec.Fields

strProp1 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop1").Value

strProp2 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop2").Value

strProp3 = Flds("http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/prop3").Value

Show:
© 2014 Microsoft