|
-
Oct 22nd, 2000, 03:14 AM
#1
Thread Starter
Lively Member
Hi,
Does anyone knows how do I get names and emails from my Outlook Contact List/Address Book and load it into say, a combo box?
I know it's something to do with the Outlook.AddressLists but I can't declare it well.
Thanks for any help!!!
-
Oct 22nd, 2000, 06:27 AM
#2
Well, using Outlook 2000 I managed to get the members in my contacts list in a listbox like this:
Code:
Private Sub Command1_Click()
Dim OA As Outlook.Application
Dim NS As Outlook.NameSpace
Dim AL As Outlook.AddressList
Dim AE As Outlook.AddressEntry
Set OA = CreateObject("Outlook.Application")
Set NS = OA.GetNamespace("MAPI")
Set AL = NS.AddressLists("Contacts")
For Each AE In AL.AddressEntries
List1.AddItem AE.Name
Next
Set AE = Nothing
Set AL = Nothing
Set NS = Nothing
Set OA = Nothing
End Sub
I suppose you could loop through the addresslists the same way I looped through the addressentries, to get the members from all addresslists.
-
Oct 22nd, 2000, 06:59 AM
#3
Thread Starter
Lively Member
Thanks FransC
BTW, is there any website that gives explanation and details on all the Outlook 2000 objects, properties and methods?
I try searching in the online MSDN but there isn't much help there 
Thanks a lot!!
-
Oct 22nd, 2000, 12:11 PM
#4
Thread Starter
Lively Member
Update, anyone? Thanks!!
-
Oct 23rd, 2000, 10:48 AM
#5
A lot of documentation is available in the outlook help for visual basic.
This is from the standard outlook help:
Get Help for Visual Basic for Applications
Open a Microsoft Outlook item.
On the Tools menu, point to Macro, and then click Visual Basic Editor.
On the Help menu, click Microsoft Visual Basic Help.
If you have not previously installed the Visual Basic for Applications support, click Yes to install it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|