A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Question on getExchangeUser method in Outlook Add-in



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 13th 09, 11:08 AM posted to microsoft.public.outlook.program_vba
paresh
external usenet poster
 
Posts: 66
Default Question on getExchangeUser method in Outlook Add-in

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.
  #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.


  #3  
Old October 13th 09, 03:56 PM posted to microsoft.public.outlook.program_vba
paresh
external usenet poster
 
Posts: 66
Default Question on getExchangeUser method in Outlook Add-in

Thanks Ken, I got using below query:

Dim oEntry As Outlook.AddressEntry
Set oEntry = usersList.Item(userName)
telNum =
oEntry.GetExchangeUser().PropertyAccessor.GetPrope rty("http://schemas.microsoft.com/mapi/proptag/0x3A09001E")

Could you tell me what is ADUC?

Also, I have used above proptag schema but I don't know from where it comes.
Is there something similar to object browser for this schema available? So
that I can use it to map between schema and property names like (Home,
Mobile, Business)TelePhoneNymber.

Thanks.
Paresh


"Ken Slovak - [MVP - Outlook]" wrote:

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.



  #4  
Old October 13th 09, 08:05 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

ADUC = Active Directory Users and Computers, the ultimate source for the
Exchange global address list.

How are you getting and using prop tags without knowing what they are or
where they come from?

I use the Exchange header files and a MAPI viewer called OutlookSpy to get
various property tags and figure out what they are. OutlookSpy displays all
the information needed for that.

--
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
...
Thanks Ken, I got using below query:

Dim oEntry As Outlook.AddressEntry
Set oEntry = usersList.Item(userName)
telNum =
oEntry.GetExchangeUser().PropertyAccessor.GetPrope rty("http://schemas.microsoft.com/mapi/proptag/0x3A09001E")

Could you tell me what is ADUC?

Also, I have used above proptag schema but I don't know from where it
comes.
Is there something similar to object browser for this schema available? So
that I can use it to map between schema and property names like (Home,
Mobile, Business)TelePhoneNymber.

Thanks.
Paresh


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pasteface method crashing outlook pasteface method crashing outlook Outlook - Using Forms 7 September 17th 09 03:41 PM
question about AddStore method [email protected] Outlook and VBA 2 November 27th 07 06:53 PM
Outlook find Method Meex Outlook and VBA 4 May 4th 07 07:25 AM
Outlook Object Send Method Rob Outlook and VBA 1 March 17th 07 06:49 PM
Best method for using Outlook out of the office Bob Outlook - General Queries 1 January 31st 06 02:05 AM


All times are GMT +1. The time now is 11:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.