[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Showing the Address Book window

Karim Benabd

12/19/2006 4:10:00 PM

Thanks Martin.

Martin Los a écrit :

> See
>
> http://www.rondebruin.nl/se...
> or
> http://www.rondebruin.... (no security warnings)
>
> Hope this helps.
>
> Martin
>
> Karim Benabd ha escrito:
>
> > Hello All,
> >
> > I need your help to get rid of the Outlook security message that shows
> > up everytime I use this procedure that shows the Address Book window so
> > that the user can select an email address that will be stored in a
> > textbox for later use.
> >
> > I am attaching the procedure and wonder if another way exist to have
> > the same result and avoid the Outlook security message.
> >
> > Thanks.
> > Karim
> > _______________________________________________
> > Sub Address(field, shortname, destinataire)
> > Dim olemsg, sDialogCaption, recips
> > On Error GoTo Erreur
> > Set olemsg = CreateObject("MAPI.Session")
> > olemsg.logon "", "", False, False, 0
> > sDialogCaption = "Sélectionnez " & field
> > If Not Err Then
> > Set recips = olemsg.addressbook(Nothing, sDialogCaption, True,
> > False, 1, shortname, "", "", 0)
> > destinataire = recips(1).Name
> > olemsg.logoff
> > End If
> > Set olemsg = Nothing
> > Set recips = Nothing
> > Exit Sub
> > Erreur:
> > Call Erreur
> > End Sub