Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Integrating with Outlook Address Book
Message
 
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00394458
Message ID:
00394528
Views:
12
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform