PC Review


Reply
Thread Tools Rate Thread

ContactItem vs AddressEntry

 
 
miaplacidus
Guest
Posts: n/a
 
      8th Jul 2004
I can pull data out of the contacts list using something
like strAnswer = objContact.BusinessTelephoneNumber. This
works fine if you are searching in your contacts folder. I
would like to do the same thing for an AddrssEntry in the
address book "Global Addrss List".

I can locate an AddressEntry using something like Set
myEntry = myAddrEntries(myCurrName)

But once I have myEntry I can't figure out how to get the
data out. Is this possible, or is the only access to the
address book through the .details method? Obviously a
modal dialog box that stops the process won't help much.


 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      8th Jul 2004
Various details like that for AddressEntry objects aren't exposed in the
Outlook object model. You have to use CDO 1.21 (optional installation for
Outlook 2000 and later) or Extended MAPI (C++ or Delphi code only) or
Redemption (www.dimastr.com/redemption) code for that using the MAPI
properties for the information you want.

See www.cdolive.com/cdo5.htm for CDO 1.21 code samples and
www.cdolive.com/cdo10.htm for various AddressEntry property tags, many of
which are undocumented. Redemption code samples are on the Redemption Web
site.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"miaplacidus" <(E-Mail Removed)> wrote in message
news:29d6801c46514$3a8c21b0$(E-Mail Removed)...
> I can pull data out of the contacts list using something
> like strAnswer = objContact.BusinessTelephoneNumber. This
> works fine if you are searching in your contacts folder. I
> would like to do the same thing for an AddrssEntry in the
> address book "Global Addrss List".
>
> I can locate an AddressEntry using something like Set
> myEntry = myAddrEntries(myCurrName)
>
> But once I have myEntry I can't figure out how to get the
> data out. Is this possible, or is the only access to the
> address book through the .details method? Obviously a
> modal dialog box that stops the process won't help much.
>
>



 
Reply With Quote
 
miaplacidus
Guest
Posts: n/a
 
      8th Jul 2004
I was afraid of that. Meanwhile I have a temporary fix
that pops up the AddressEntry.detail form. but before it
pops up I get a warning message from outlook that
says "another program is trying to access email addresses
stored in outlook. Do you want to allow this?"

Can I bypass that message?


>-----Original Message-----
>Various details like that for AddressEntry objects aren't

exposed in the
>Outlook object model. You have to use CDO 1.21 (optional

installation for
>Outlook 2000 and later) or Extended MAPI (C++ or Delphi

code only) or
>Redemption (www.dimastr.com/redemption) code for that

using the MAPI
>properties for the information you want.
>
>See www.cdolive.com/cdo5.htm for CDO 1.21 code samples and
>www.cdolive.com/cdo10.htm for various AddressEntry

property tags, many of
>which are undocumented. Redemption code samples are on

the Redemption Web
>site.
>
>--
>Ken Slovak
>[MVP - Outlook]
>http://www.slovaktech.com
>Author: Absolute Beginner's Guide to Microsoft Office

Outlook 2003
>Reminder Manager, Extended Reminders, Attachment Options
>http://www.slovaktech.com/products.htm
>
>
>"miaplacidus" <(E-Mail Removed)> wrote in message
>news:29d6801c46514$3a8c21b0$(E-Mail Removed)...
>> I can pull data out of the contacts list using something
>> like strAnswer = objContact.BusinessTelephoneNumber.

This
>> works fine if you are searching in your contacts

folder. I
>> would like to do the same thing for an AddrssEntry in

the
>> address book "Global Addrss List".
>>
>> I can locate an AddressEntry using something like Set
>> myEntry = myAddrEntries(myCurrName)
>>
>> But once I have myEntry I can't figure out how to get

the
>> data out. Is this possible, or is the only access to the
>> address book through the .details method? Obviously a
>> modal dialog box that stops the process won't help much.
>>
>>

>
>
>.
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      8th Jul 2004
If your code in running in a COM addin or Outlook VBA project in Outlook
2003 the warning won't appear if you derive all your Outlook objects from
the Application object passed to you in On_Connection in a COM addin or the
intrinsic Application object in Outlook VBA.

Otherwise you would need to use Extended MAPI code or Redemption code to
avoid the prompt, or permit the methods and properties you need in the
Outlook security form if you are using Exchange server, or use Express
ClickYes which uses SendKeys to answer the prompts. I think ClickYes has
some security problems, I use Redemption myself. And using that I can get at
the MAPI properties of an AddressEntry object so I don't need any
workarounds and can read the properties if I need to use them in code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"miaplacidus" <(E-Mail Removed)> wrote in message
news:29f1601c46529$87c9a460$(E-Mail Removed)...
> I was afraid of that. Meanwhile I have a temporary fix
> that pops up the AddressEntry.detail form. but before it
> pops up I get a warning message from outlook that
> says "another program is trying to access email addresses
> stored in outlook. Do you want to allow this?"
>
> Can I bypass that message?



 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get contactitem from addressentry sd Microsoft Outlook Program Addins 3 26th Jun 2008 01:54 PM
Getting an AddressEntry by Name =?Utf-8?B?UmE=?= Microsoft Outlook Interoperability 2 14th May 2007 07:38 PM
Which way should I add an AddressEntry? Shelby Microsoft Outlook VBA Programming 3 15th Jun 2004 02:32 PM
CDO 1.21 AddressEntry.Fields =?Utf-8?B?TWlrZQ==?= Microsoft C# .NET 3 13th Apr 2004 02:01 PM
how to use Email1EntryID to get AddressEntry Hendrik Schreiber Microsoft Outlook VBA Programming 3 10th Sep 2003 08:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 PM.