|
 |
asp_cdo thread: Accessing AddressEntry field values using MAPI Property tags
Message #1 by "Tim Kurtz" <tokurtz@h...> on Fri, 18 Jan 2002 23:37:56
|
|
I'm having some trouble retrieving the smtp email address field value
from an AddressEntry in the GAL.
I'm using the constant CdoPR_EMAIL = &H39FE001E
When I use the following line of code to retrieve the value:
objAddressEntry.Fields.Item(CdoPR_EMAIL).value
it returns '???????????m', but when I cycle thru the fields collection
of the AddressEntry with the following code:
for each objField in objAddressEntry.Fields
if objField.id = CdoPR_EMAIL then
Response.Write objField.value & "<BR>"
end if
next
it returns the actual value of the smtp address field.
I'm puzzled as to why this happens, if anyone has an answer please
let me know, any help is appreciated.
Thanks
Message #2 by "Siegfried Weber" <sweber@c...> on Sat, 19 Jan 2002 17:10:25 +0100
|
|
This might be one reason why &H39FE001E is undocumented. I always use:
strEMailAddress =3D_
objSession.GetAddressEntry(objAddressEntry.ID).Fields(CdoPR_EMAIL)
<Siegfried />
> -----Original Message-----
> From: Tim Kurtz [mailto:tokurtz@h...]
> Sent: Saturday, January 19, 2002 12:38 AM
> To: ASP CDO
> Subject: [asp_cdo] Accessing AddressEntry field values using MAPI
Property
> tags
>
> I'm having some trouble retrieving the smtp email address field value
> from an AddressEntry in the GAL.
>
> I'm using the constant CdoPR_EMAIL =3D &H39FE001E
>
> When I use the following line of code to retrieve the value:
>
> objAddressEntry.Fields.Item(CdoPR_EMAIL).value
>
> it returns '???????????m', but when I cycle thru the fields collection
> of the AddressEntry with the following code:
>
> for each objField in objAddressEntry.Fields
> if objField.id =3D CdoPR_EMAIL then
> Response.Write objField.value & "<BR>"
> end if
> next
>
> it returns the actual value of the smtp address field.
>
> I'm puzzled as to why this happens, if anyone has an answer please
> let me know, any help is appreciated.
>
> Thanks
>
>
$subst('Email.Unsub').
Message #3 by "David M" <ogwodka@h...> on Mon, 21 Jan 2002 17:56:35 +0000
|
|
I think the reason is the Item collection is indexed by Name, so you are
searching for the value with a named index of &H39FE001E. Quite a few of
these properties do not have explicitly named indexes and therefore cannot
be accessed using a index name.
>From: "Tim Kurtz" <tokurtz@h...>
>Reply-To: "ASP CDO" <asp_cdo@p...>
>To: "ASP CDO" <asp_cdo@p...>
>Subject: [asp_cdo] Accessing AddressEntry field values using MAPI Property
>tags
>Date: Fri, 18 Jan 2002 23:37:56
>
>I'm having some trouble retrieving the smtp email address field value
>from an AddressEntry in the GAL.
>
>I'm using the constant CdoPR_EMAIL = &H39FE001E
>
>When I use the following line of code to retrieve the value:
>
> objAddressEntry.Fields.Item(CdoPR_EMAIL).value
>
>it returns '???????????m', but when I cycle thru the fields collection
>of the AddressEntry with the following code:
>
> for each objField in objAddressEntry.Fields
> if objField.id = CdoPR_EMAIL then
> Response.Write objField.value & "<BR>"
> end if
> next
>
>it returns the actual value of the smtp address field.
>
>I'm puzzled as to why this happens, if anyone has an answer please
>let me know, any help is appreciated.
>
>Thanks
>
>
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
|
|
 |