Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read Outlook address book?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00282040
Message ID:
00284153
Vues:
16
That is great!

I have found that the following syntax works:

oAddressList = oNameSpace.AddressLists("Global Address List")
oAddressList = oNameSpace.AddressLists("Personal Address Book")
oAddressList = oNameSpace.AddressLists("Contacts")

And I can get the name and e-mail address from any of the above with the following code:

?oAddressList.AddressEntries(2).Name
?oAddressList.AddressEntries(2).Address

Thanks much! much!


>You are on the right track there John. George, you may try this too:
>
>CLEAR
>SET SAFETY OFF
>CREATE TABLE getlist (name C(50))
>oOlApp = CREATEOBJECT("Outlook.Application")
>IF TYPE("oOlApp") # "O"
>	MESSAGEBOX("Could not start Outlook!")
>	RETURN
>ENDIF
>oNameSpace      = oOlApp.GetNameSpace("MAPI")
>oAddressList    = oNameSpace.AddressLists("Global Address List")
>oAddressEntries = oAddressList.AddressEntries
>FOR EACH oAddressEntry IN oAddressEntries
>	INSERT INTO getlist VALUES (oAddressEntry.Name)
>ENDFOR
George
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform