View Single Post
  #2  
Old October 13th 09, 03:14 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Question on getExchangeUser method in Outlook Add-in

It's expected since those properties aren't exposed in the Outlook 2007
object model.

If those properties exist at all on the ExchangeUser object you'd have to
use the PropertyAccessor to get at them. In ADUC there is a field for home
number but not for home mobile number, so unless that was added as a custom
property or in a different field I doubt you'd find that one.

Home phone number (PR_HOME_TELEPHONE_NUMBER) should be retrievable using
PropertyAccessor and the DASL tag "urn:schemas:contacts:homePhone", assuming
it exists.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"paresh" wrote in message
...
Hi,

I have been using below code to get the users detailed contact
information.

Dim usersList As Outlook.AddressEntries
Dim oEntry As Outlook.AddressEntry
Dim oContact As Object

Set usersList = Outlook.Application.Session.AddressLists.Item("All
Users").AddressEntries
Set oEntry = usersList.Item("user name")
MsgBox oEntry.GetExchangeUser().BusinessTelephoneNumber & " " &
oEntry.GetExchangeUser().MobileTelephoneNumber

I could see BusinessTelephoneNumber and MobileTelephoneNumber properties
in
GetExchangeUser() method but couldn't find HomeMobileNumber. I have
verified
the same from Object browser and couldn;t see the
HomeTelephoneNumberProperty
there.

Is this expected? How could I get the HomeTelephoneNumber then?

Though I could see the HomeTelephoneNumber property is a part of
ContactItem, I cannot use it as all users won't be part of contacts
folder.

Thanks.


Ads