Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook address book where are you?
Message
 
To
24/05/2001 20:39:10
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00511267
Message ID:
00511295
Views:
17
This message has been marked as the solution to the initial question of the thread.
This will get you the contents of Outlook address book and insert them into a cursor. Hope this helps.
#DEFINE Contacts 10

WAIT WINDOW 'Building Address List...' NOWAIT NOCLEAR

LOCAL oNameSpace, oContacts

oOutlook = CREATEOBJECT('Outlook.Application')
oNameSpace = oOutlook.GetNameSpace('MAPI')
oContacts = oNameSpace.GetDefaultFolder(Contacts)

CREATE CURSOR ContactInfo ;
  (address C(100), fname C(20), lname C(40))

FOR EACH oContact IN oContacts.Items
  cAddr = oContact.Email1Address
  cFname = oContact.FirstName
  cLname = oContact.LastName
  INSERT INTO ContactInfo (address, fname, lname) VALUES (cAddr, cFname, cLname)
ENDFOR

RELEASE oOutlook
RELEASE oNamesSpace
RELEASE oContacts

WAIT CLEAR
Regards,
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform