Getting to 'Phone Number (Others)' in MAPI CDO??

  • Thread starter Thread starter Aaron Elliott
  • Start date Start date
A

Aaron Elliott

Hi All,

I have a VBS script that creates a phone list using CDO but I am having
trouble getting the above AD attribute out (which we are using for each
persons Phone Extension). We are using it in the User Details Template as
Phone-Office-Other which comes up AOK.

I have tried using the pretty much all of the CDO MAPI Attributes with the
word Phone in them to no avail..
Could it because it is a multivalue type that it does not appear?
Or could it be because we are running Outlook 2000 that it does not have
access to that attribute?

Any clues would be GREAT!!

Aaron
 
Did you looks at the contact using MdbView or OutlookSpy? Did you try the
PR_OTHER_TELEPHONE_NUMBER (0x3A1F001E) property? Are you accessing the
contact using the Address Book interfaces or as an IPM.Contact message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thank you for the reply!

I am using the address book (GAL) interface for this - not the contacts
list.
I have got a copy of Outlook spy, but I am not sure how to use it to get to
what I need!
I also re-tryed your suggested property - no go...
 
Click IAddrBook, then "Open Root Container", go to the GetHierachyTable tab,
open the container, then go to either GetHierachyTable or GetContentsTable
tab to open the entry depending on where it lives.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Brilliant!! I found the one I am after:
PR_BUSINESS2_TELEPHONE_NUMBER_A_MV
0x3A1B101E

But I cannot get it to display/appear/read.
The error I get back is 13.

I gather this is happening because its a Multivalue?
 
For multivalues properties CDO returns a variant array of variant.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Aaron Elliott said:
Brilliant!! I found the one I am after:
PR_BUSINESS2_TELEPHONE_NUMBER_A_MV
0x3A1B101E

But I cannot get it to display/appear/read.
The error I get back is 13.

I gather this is happening because its a Multivalue?


Dmitry Streblechenko (MVP) said:
Click IAddrBook, then "Open Root Container", go to the GetHierachyTable tab,
open the container, then go to either GetHierachyTable or GetContentsTable
tab to open the entry depending on where it lives.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Aaron Elliott said:
Thank you for the reply!

I am using the address book (GAL) interface for this - not the contacts
list.
I have got a copy of Outlook spy, but I am not sure how to use it to
get
to
what I need!
I also re-tryed your suggested property - no go...

Did you looks at the contact using MdbView or OutlookSpy? Did you
try
the
 
How do I display that in this context?

objOutputFile.WriteLine("<td> EXT" &
cdoAddrEntry.fields(PR_BUSINESS2_TELEPHONE_NUMBER_A_MV))


Dmitry Streblechenko (MVP) said:
For multivalues properties CDO returns a variant array of variant.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Something along the lines (off the top of my head):

dim tels
set tels = AddressEntry.Fields(PR_BUSINESS2_TELEPHONE_NUMBER_A_MV).Value
for i = UBound(tels) to LBound(tels)
Debug.Print tels(i)
next

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


Aaron Elliott said:
How do I display that in this context?

objOutputFile.WriteLine("<td> EXT" &
cdoAddrEntry.fields(PR_BUSINESS2_TELEPHONE_NUMBER_A_MV))


Dmitry Streblechenko (MVP) said:
For multivalues properties CDO returns a variant array of variant.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top