Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Outlook's Address list
Message
From
28/06/1999 17:58:50
 
 
To
28/06/1999 12:46:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00234824
Message ID:
00234987
Views:
32
>I have a VFP form that automates Outlook, but i can't figure out how to make Address List available to the user.
>
>
>Thanks.
>Sergio
I would suggest you use functionality that is already there. You can create you new message, fill in known values (subject, body) and let the user select the adressee as they regularly do by displaying the message window with the Display method. Anyway, here is a sample of how you can access the OL global adress list:
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
Previous
Reply
Map
View

Click here to load this message in the networking platform