Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integrating with Outlook Address Book
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00394458
Message ID:
00394528
Vues:
10
>Does anybody know how I would go about accessing the MS Outlook Contacts so that I can get info out of them for my application.

Taken from a VFP forum message by John Koziol. You'll have to translate. ;-)
oOlApp = CreateObject("Outlook.Application")	&& Open Outlook
oOlNS  = oOlApp.GetNameSpace("MAPI")	  && Set name space
oOlC   = oOlNS.GetDefaultFolder(10)	&& 10 = Default contacts folder

cFind="John Smith"
oItem=olC.Items.Find('[FullName] = "&cFind"')
IF !ISNULL(oItem)
   oItem.GetInspector
   oItem.Display
ELSE
   oExplorer=olC.GetExplorer
   oExplorer.Display
ENDIF
You can substitue FOR EACH ... NEXT loop for the Find if you want.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform