Use current user properties from the Microsoft Exchange Server global address list
In code, open an OLE messaging session and log on, and then use the following table to reference the property you want to use.
Set olemSession = Application.CreateObject("MAPI.Session")
ReturnCode = olemSession.Logon( Application.GetNameSpace("MAPI").CurrentUser, "", False, False, 0 )
myPage = Item.GetInspector.ModifiedFormPages("Message")
Set myUser = olemSession.CurrentUser
Item.UserProperties.Find("Name") = myUser.Name
Item.UserProperties.Find("Messaging Address") = myUser.Address
Item.UserProperties.Find("MAPI First Name") = myUser.Fields.item(&h3a06001e)
Address Book Property | Reference |
---|---|
PR_GIVEN_NAME | &h3a06001e |
PR_INITIALS | &h3a0a001e |
PR_SURNAME | &h3a11001e |
PR_7BIT_DISPLAY_NAME | &h39ff001e |
PR_STREET_ADDRESS | &h3a29001e |
PR_LOCALITY | &h3a27001e |
PR_STATE_OR_PROVINCE | &h3a28001e |
PR_POSTAL_CODE | &h3a2a001e |
PR_COUNTRY | &h3a26001e |
PR_TITLE | &h3a17001e |
PR_COMPANY_NAME | &h3a16001e |
PR_DEPARTMENT_NAME | &h3a18001e |
PR_OFFICE_LOCATION | &h3a19001e |
PR_ASSISTANT | &h3a30001e |
PR_BUSINESS_TELEPHONE_NUMBER | &h3a08001e |