WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Selecting a contact from the address book.

 
   Home -> Office -> Program Forms RSS
Next:  How do I open an email hot link in another browse..  
Author Message
Lucy

External


Since: Mar 06, 2006
Posts: 47



(Msg. 1) Posted: Tue Aug 26, 2008 4:53 am
Post subject: Selecting a contact from the address book.
Archived from groups: microsoft>public>outlook>program_forms (more info?)

Hi,

I would like to find a way to select a contact and add their address to a
textbox. I want my controls to be similar to the To button and its textbox.
When my button is clicked the GAL dialog should open and when a contact is
selected their address should appear in the textbox. I do not want the
message then to be sent to this contact. How can I do this? (I am coding in
C# for Outlook 2003)

Thanks.
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2899



(Msg. 2) Posted: Tue Aug 26, 2008 9:36 am
Post subject: Re: Selecting a contact from the address book. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Using the Outlook 2003 object model there's no way to show the address book
dialog. You can with the Outlook 2007 object model.

Since CDO 1.21 and Extended MAPI (C++ or Delphi only) aren't supported for
use with managed code, you really have 2 options given your constraints. You
can use the 3rd party Redemption library (www.dimastr.com/redemption) and
its RDOSession.AddressBook.ShowAddressBook() method to display the GAL and
return a selection from it, or you can iterate the GAL as an
Outlook.AddressList and get each AddressEntry from its AddressEntries
collection and display them in your own custom address book dialog.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Lucy" <Lucy.TakeThisOut@discussions.microsoft.com> wrote in message
news:97C3E8DA-FDCD-4ED5-88B3-4CD8B215CA0A@microsoft.com...
> Hi,
>
> I would like to find a way to select a contact and add their address to a
> textbox. I want my controls to be similar to the To button and its
> textbox.
> When my button is clicked the GAL dialog should open and when a contact is
> selected their address should appear in the textbox. I do not want the
> message then to be sent to this contact. How can I do this? (I am coding
> in
> C# for Outlook 2003)
>
> Thanks.
Back to top
Login to vote
Lucy

External


Since: Mar 06, 2006
Posts: 47



(Msg. 3) Posted: Tue Aug 26, 2008 9:36 am
Post subject: Re: Selecting a contact from the address book. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for your helpful reply. Is there anyway I could use the current 'To'
button (Or similar button) and just not send it to the selected address?

"Ken Slovak - [MVP - Outlook]" wrote:

> Using the Outlook 2003 object model there's no way to show the address book
> dialog. You can with the Outlook 2007 object model.
>
> Since CDO 1.21 and Extended MAPI (C++ or Delphi only) aren't supported for
> use with managed code, you really have 2 options given your constraints. You
> can use the 3rd party Redemption library (www.dimastr.com/redemption) and
> its RDOSession.AddressBook.ShowAddressBook() method to display the GAL and
> return a selection from it, or you can iterate the GAL as an
> Outlook.AddressList and get each AddressEntry from its AddressEntries
> collection and display them in your own custom address book dialog.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Lucy" <Lucy DeleteThis @discussions.microsoft.com> wrote in message
> news:97C3E8DA-FDCD-4ED5-88B3-4CD8B215CA0A@microsoft.com...
> > Hi,
> >
> > I would like to find a way to select a contact and add their address to a
> > textbox. I want my controls to be similar to the To button and its
> > textbox.
> > When my button is clicked the GAL dialog should open and when a contact is
> > selected their address should appear in the textbox. I do not want the
> > message then to be sent to this contact. How can I do this? (I am coding
> > in
> > C# for Outlook 2003)
> >
> > Thanks.
>
>
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2899



(Msg. 4) Posted: Tue Aug 26, 2008 1:15 pm
Post subject: Re: Selecting a contact from the address book. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You could use the To button and then read the Recipients collection but
unfortunately there are no events to handle when the To button is pressed or
when recipients are added to an item. So you'd never know when those things
occurred.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Lucy" <Lucy RemoveThis @discussions.microsoft.com> wrote in message
news:8ED732D4-BA60-4687-A876-18AF280AF6B7@microsoft.com...
> Thanks for your helpful reply. Is there anyway I could use the current
> 'To'
> button (Or similar button) and just not send it to the selected address?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET