Open Address book


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Open Address book

  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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center