Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access Outlook's Address Book?
Message
De
21/06/2000 11:12:55
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00382609
Message ID:
00382711
Vues:
14
Hi Gerry,

In the code I posted, oOlC is the Items collection. Each member of the collection is an entry. Think of it as an array. So, for example, if you wanted the primary email address of the 10th person:

?oOlC.Items(10).Email1Address

Now, if you need to pare down the list, you can create another collection using the oOlC.Restrict method to create a list of filtered entries.


>How can I go about creating a list of all users in the Address Book?

>>This is code I use to validate a name. If it can find the name, it pops up the Properties inspector for that contact. If not, it pops up the explorer showing all entries.
>>
>>The downside is that it has to exactly match....Outlook does not have a very good way to do fuzzy matching.
>>
>>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
>>
>>
>>>Thanks to all who have given code snippets for sending email from within VFP. I've got that working fine in my application.
>>>
>>>HOWEVER, I'd like to validate the email address entered, or give the user a combo box picklist. How do I access the Outlook Address Book in detail?
>>>
>>>Please don't ask me to look at win32api.hlp, unless it's on the web somewhere. It didn't get installed with VFP 6.0a.
>>>
>>>Thanks!
>>>- Gerry
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform