?
Solved

Accessing info from Address Book

Posted on 2000-01-27
11
Medium Priority
?
213 Views
Last Modified: 2010-05-18
How am i able to access and retrieve addresses in the Address Book of Outlook programmatically through an external application?
Basically it is just like pressing Outlook 'To' field, a select
names window pops up.
0
Comment
Question by:JeromZ
  • 6
  • 5
11 Comments
 

Author Comment

by:JeromZ
ID: 2392056
Adjusted points to 100
0
 
LVL 16

Expert Comment

by:Neo_mvps
ID: 2392531
Can you expand furter?  Did you just want to display the Address Book to your users or where you thinking of just scanning a particular address book and picking up certain addresses for use?
0
 

Author Comment

by:JeromZ
ID: 2395314
Edited text of question.
0
Easily manage email signatures in Office 365

Managing email signatures in Office 365 can be a challenging task if you don't have the right tool. CodeTwo Email Signatures for Office 365 will help you implement a unified email signature look, no matter what email client is used by users. Test it for free!

 
LVL 16

Expert Comment

by:Neo_mvps
ID: 2395376
Outlook doesn't expose and "AddressBook" method.  You need to resort to using Collaboration Data Objects (CDO).

Basically the code looks something like:

Dim oSession as MAPI.Session
Dim oRecColl as MAPI.Recipients

Set oSession = CreateObject("MAPI.Session)
oSession.Logon "Profile", "Password", False, False

Set oRecColl = oSession.AddressBook


Outlook 97 does not come with CDO.
Outlook 98 installs CDO by default.
Outlook 2K comes w/ it but has to be installed under a custom install.

CDO distribution is available at www.microsoft.com/exchange and you can find excellent reference material at www.cdolive.com.
0
 

Author Comment

by:JeromZ
ID: 2395389
Thanks!
I am going to try it out!
0
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 400 total points
ID: 2395396
Not a problem and let me know how it works out. ;)
0
 

Author Comment

by:JeromZ
ID: 2476936
It works with a little modification
as i just do it in Outlook Script Editor.
Can get the same dialog box but not able to send.
0
 
LVL 16

Expert Comment

by:Neo_mvps
ID: 2478124
Try something like Item.Send if you are using VBScript from within a form.
0
 

Author Comment

by:JeromZ
ID: 2498369
It does not work....only sends from the To:...Bcc:...and Cc:...fields but not own created ones.
0
 

Author Comment

by:JeromZ
ID: 2498608
It does not work....only sends from the To:...Bcc:...and Cc:...fields but not own created ones.
0
 
LVL 16

Expert Comment

by:Neo_mvps
ID: 2498609
That would be right because the messaging subsystem would go nuts if it had to figure out which field to read from.  As a work around.  You can copy a value from your custom field to an Item.To field.  Only other thing I can think of is to interogate the the Recipient collection object returned and plug in the email address for each item to Item.To.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
After a recent Outlook migration from a 2007 to 2010 environment, some issues with Distribution List owners were realized. In this article, I explain how that was rectified.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question