Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read Outlook address book?
Message
From
29/10/1999 16:04:20
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00282040
Message ID:
00284093
Views:
21
>>>George:
>>>
>>>I think I may have found something for you. Look at the AddressLists collection in Outlook. I found some sample code in the Outlook Language Reference that looks like, when converted to VFP:
>>>
>>>oOutlook=CREATEOBJECT("Outlook.Application")
>>>oNameSpace=oOutlook.GetNameSpace("MAPI")
>>>oGAddressList=oNameSpace.AddressLists("Global Address List")
>>>
>>>Now, I'm kinda lost at that point, and I have no way to test this (on a standalone machine) but you may be able to go from there. Look at the AddressEntries collection ;-)
>>>
>>>
>>>
>>>>>> I think you have to change the value of GetDefaultFolder and/or cruise through the Folders collection until you find the right Folder, <<
>>>>
>>>>I tried that, have not been able to find a folder that references the Exchange Global address book.
>>>>
>>>>I have noticed that Office apps have the ability to bring up the Outlook address pick dialog. Like when creating a label in Word you can click the Address icon which brings up the dialog that allows you to pick from any of your Outlook addresses. Here you can pick from any of the address lists. I wonder if there is a way to call this dialog from within VFP?
>>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
>
>Any idea how to add an email message to outlook express's queue so it will go out with the rest of the mail? I have tried and it always causes the dial up dialog to rear its ugly head...
I haven't worked at all with OL Express. Since it does not expose an object model you have to do it through MSMAPI calls. Maybe if you find a way to put a message in the Outbox without actually sending it. From there it will go out the next time you connect and send/receive.
Previous
Reply
Map
View

Click here to load this message in the networking platform