Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on class MAPIMAIL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00704577
Message ID:
00704616
Vues:
19
Hi Samuel:

This is what I use to get address from Outlook Contacts:

#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

SELECT ContactInfo
SCAN
THISFORM.lstSelect.ADDITEM(ContactInfo.address)
ENDSCAN

RELEASE oOutlook
RELEASE oNamesSpace
RELEASE oContacts

THIS.REFRESH()
WAIT CLEAR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform