Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pull from and post data to Outlook
Message
From
10/10/2000 16:11:42
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
10/10/2000 12:28:49
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00427281
Message ID:
00427530
Views:
17
Never mind, I figured it out... Here's what I came up with...

****************
oOutlook=CREATEOBJECT("Outlook.Application")
oNameSpace=oOutlook.GetNameSpace("MAPI")
oContactsFolder=oNameSpace.GetDefaultFolder(10)
oContacts=oContactsFolder.Items
oFolders=oContactsFolder.Folders

strFilter = "[MessageClass] >= 'IPM.Contact' AND [MessageClass] <= 'IPM.Contact'"
oContacts = oContacts.Restrict(strFilter)

i=0
*SCAN THRU CONTACTS MAIN FOLDER
For each loContact in oContacts
i=i+1
With loContact
Wait window .CompanyName
Endwith
Endfor

*SCAN THRU CONTACTS SUBFOLDERS (IF ANY)
For each loFolder in oFolders
oContacts=oContactsFolder.Folders(loFolder.Name).Items
oContacts = oContacts.Restrict(strFilter)
For each loContact in oContacts
i=i+1
With loContact
Wait window .CompanyName
Endwith
Endfor
Endfor
? i
************

Is there a way that you see that I could combine the two steps into one?
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform