Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook phone book
Message
 
À
22/11/2006 01:47:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01171640
Message ID:
01171676
Vues:
12
would this do? you wil have to modify the code slightly
CREATE CURSOR emaillist ;
 (Firstname C(30), Lastname C(30), email C(30))


#define olFolderContacts 10

outlook = CreateObject("Outlook.Application")
namesp = outlook.GetNamespace("MAPI")
folder = namesp.GetDefaultFolder(olFolderContacts)
contacts = folder.Items
cnt = contacts.Count

SELECT 0 
SELECT emaillist

For i = 1 To cnt
	contact = contacts.Item(i)
	
	IF contact->FirstName = ' ' OR contact->LastName = ' ' OR contact->Email1Address = ' '
		* do nothing
	ELSE
		APPEND BLANK
		REPLACE Firstname WITH contact->FirstName
		REPLACE Lastname WITH contact->LastName
		REPLACE email WITH contact->Email1Address
	ENDIF
	****? contact->FirstName, contact->LastName, contact->Email1Address
Next i

BROWSE TITLE 'Contact list'
outlook.Quit()
~M

>How can I call the outlook phonebook and get the email address ?
>thanks a lot
Go raibh maith agat

~M
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform