PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Getting to 'Phone Number (Others)' in MAPI CDO??

Reply

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

 
Thread Tools Rate Thread
Old 03-05-2004, 02:51 AM   #1
Aaron Elliott
Guest
 
Posts: n/a
Default Getting to 'Phone Number (Others)' in MAPI CDO??


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




  Reply With Quote
Old 03-05-2004, 06:49 AM   #2
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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


"Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> 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
>
>
>
>



  Reply With Quote
Old 04-05-2004, 12:05 AM   #3
Aaron Elliott
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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

"Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> 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
>
>
> "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > 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
> >
> >
> >
> >

>
>



  Reply With Quote
Old 04-05-2004, 06:10 AM   #4
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
message news:e9euuMWMEHA.936@TK2MSFTNGP11.phx.gbl...
> 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...
>
> "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> > 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
> >
> >
> > "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> > message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > > 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
> > >
> > >
> > >
> > >

> >
> >

>
>



  Reply With Quote
Old 05-05-2004, 12:20 AM   #5
Aaron Elliott
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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)" <dmitry@dimastr.com> wrote in message
news:OBTQqYZMEHA.3668@TK2MSFTNGP11.phx.gbl...
> 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> message news:e9euuMWMEHA.936@TK2MSFTNGP11.phx.gbl...
> > 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...
> >
> > "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> > news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> > > 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
> > >
> > >
> > > "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote

in
> > > message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



  Reply With Quote
Old 05-05-2004, 06:32 AM   #6
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
message news:OswZn5iMEHA.1272@tk2msftngp13.phx.gbl...
> 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)" <dmitry@dimastr.com> wrote in message
> news:OBTQqYZMEHA.3668@TK2MSFTNGP11.phx.gbl...
> > 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> > message news:e9euuMWMEHA.936@TK2MSFTNGP11.phx.gbl...
> > > 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...
> > >
> > > "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> > > news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> > > > 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
> > > >
> > > >
> > > > "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau>

wrote
> in
> > > > message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



  Reply With Quote
Old 05-05-2004, 06:40 AM   #7
Aaron Elliott
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

How do I display that in this context?

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


"Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
news:umZspJmMEHA.2676@TK2MSFTNGP12.phx.gbl...
> 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> message news:OswZn5iMEHA.1272@tk2msftngp13.phx.gbl...
> > 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)" <dmitry@dimastr.com> wrote in message
> > news:OBTQqYZMEHA.3668@TK2MSFTNGP11.phx.gbl...
> > > 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote

in
> > > message news:e9euuMWMEHA.936@TK2MSFTNGP11.phx.gbl...
> > > > 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...
> > > >
> > > > "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> > > > news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> > > > > 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
> > > > >
> > > > >
> > > > > "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau>

> wrote
> > in
> > > > > message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > > > > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



  Reply With Quote
Old 05-05-2004, 08:30 AM   #8
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Getting to 'Phone Number (Others)' in MAPI CDO??

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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
message news:ORZpwNmMEHA.2676@TK2MSFTNGP12.phx.gbl...
> How do I display that in this context?
>
> objOutputFile.WriteLine("<td> EXT" &
> cdoAddrEntry.fields(PR_BUSINESS2_TELEPHONE_NUMBER_A_MV))
>
>
> "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> news:umZspJmMEHA.2676@TK2MSFTNGP12.phx.gbl...
> > 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau> wrote in
> > message news:OswZn5iMEHA.1272@tk2msftngp13.phx.gbl...
> > > 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)" <dmitry@dimastr.com> wrote in message
> > > news:OBTQqYZMEHA.3668@TK2MSFTNGP11.phx.gbl...
> > > > 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" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau>

wrote
> in
> > > > message news:e9euuMWMEHA.936@TK2MSFTNGP11.phx.gbl...
> > > > > 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...
> > > > >
> > > > > "Dmitry Streblechenko (MVP)" <dmitry@dimastr.com> wrote in message
> > > > > news:udLceJNMEHA.2456@TK2MSFTNGP12.phx.gbl...
> > > > > > 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
> > > > > >
> > > > > >
> > > > > > "Aaron Elliott" <aaron.NOSPAM.elliott@SPAMhallmark.MEcom.NOTau>

> > wrote
> > > in
> > > > > > message news:uAys3ELMEHA.2716@tk2msftngp13.phx.gbl...
> > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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