DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Duane Snelling Guest

    Open Address book


    I have a command button called 'TO:'. When Clicking it I want the same effect
    as if you click the TO: button in Outlook to open the address book.

    Thanks...
    Duane...

  2. #2
    Eugene Guest

    Re: Open Address book


    Duane...

    ...You'll need Microsoft CDO 1.21
    library (from microsoft.com) and Microsoft Outlook 9.0 object library...

    Eugene...

    "Duane Snelling" <dsnelling@msc.ca> wrote:
    >
    >I have a command button called 'TO:'. When Clicking it I want the same

    effect
    >as if you click the TO: button in Outlook to open the address book.
    >
    >Thanks...
    >Duane...



  3. #3
    Duane Snelling Guest

    Re: Open Address book


    Eugene,
    I have both. Where do I start?
    Duane...

    "Eugene" <ezhitomirsky@ncotbo.com> wrote:
    >
    >Duane...
    >
    >...You'll need Microsoft CDO 1.21
    >library (from microsoft.com) and Microsoft Outlook 9.0 object library...
    >
    >Eugene...
    >
    >"Duane Snelling" <dsnelling@msc.ca> wrote:
    >>
    >>I have a command button called 'TO:'. When Clicking it I want the same

    >effect
    >>as if you click the TO: button in Outlook to open the address book.
    >>
    >>Thanks...
    >>Duane...

    >



  4. #4
    Eugene Guest

    Re: Open Address book


    ...
    Must first create MAPI session and logon



    ...Then...
    dim objrecipcoll as object

    Set objrecipcoll = objSession.AddressBook( _
    Title:="Select Attendees", _
    forceResolution:=True, _
    recipLists:=1, _
    toLabel:="&Very Important People")

    And you'll see it

    ...Eugene...
    ...

    "Duane Snelling" <dsnelling@msc.ca> wrote:
    >
    >Eugene,
    >I have both. Where do I start?
    >Duane...
    >
    >"Eugene" <ezhitomirsky@ncotbo.com> wrote:
    >>
    >>Duane...
    >>
    >>...You'll need Microsoft CDO 1.21
    >>library (from microsoft.com) and Microsoft Outlook 9.0 object library...
    >>
    >>Eugene...
    >>
    >>"Duane Snelling" <dsnelling@msc.ca> wrote:
    >>>
    >>>I have a command button called 'TO:'. When Clicking it I want the same

    >>effect
    >>>as if you click the TO: button in Outlook to open the address book.
    >>>
    >>>Thanks...
    >>>Duane...

    >>

    >



  5. #5
    Join Date
    Dec 2009
    Posts
    1

    Re: Open Address book

    Eugine,
    I have found this extremely useful, I have looked everywhere to find a Visual basic script that works well in Visual basic 2008, and with a bit of tweaking, I have finally got it to work.
    My problem is that I can not get it to return the selected name to a variable when the outlook window is closed.
    Could you let me know how I do that?
    The code that I am using is:

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim objrecipcoll As Object
    Dim objsession As MAPI.Session
    objsession = New MAPI.Session
    objsession.Logon(ProfileName:="XXXXX", NewSession:=True, ShowDialog:=True)
    objrecipcoll = objsession.AddressBook( _
    Title:="Select Attendees", _
    ForceResolution:=True, _
    RecipLists:=1, _
    ToLabel:="&Select recipient")


    End Sub

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links