Recipient Containers Help!!! 
Author Message
 Recipient Containers Help!!!

In VB I'm trying to fill a ComboBox with a list of all Recipient Containers
from the Exchange Server.  However, I have no idea how to get a list of
them.  If anyone knows a why to do this, I'd greatly appreciate it :)

Jim Kallio



Tue, 22 Jan 2002 03:00:00 GMT  
 Recipient Containers Help!!!
This is meant to run in Outlook, but you can modify it (and take out the
test for address entry type)
'
' This routine runs from a command button "ComTest", and fills a list box
"ListBox1"
' with the names of all Global Distribution Lists
'
Sub ComTest_Click()
 Const CdoDistList = 1   'A public distribution list.
 Const CdoAddressListGAL = 0 'Global Address List
 set objSession = CreateObject("MAPI.Session")
 objSession.Logon ,,,False
 set objList = Item.GetInspector.ModifiedFormPages("Message").ListBox1
 objList.Clear
     Set objAddressList = objSession.GetAddressList(CdoAddressListGAL)
     Set colAddressEntries = objAddressList.AddressEntries
     For Each objAddressEntry In colAddressEntries
       If objAddressEntry.DisplayType = CdoDistList  Then
          objList.AddItem objAddressEntry.Name
        End If
     Next
 objSession.Logoff
 set objSession = Nothing
End Sub


Quote:
> In VB I'm trying to fill a ComboBox with a list of all Recipient
Containers
> from the Exchange Server.  However, I have no idea how to get a list of
> them.  If anyone knows a why to do this, I'd greatly appreciate it :)

> Jim Kallio



Tue, 22 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Recipient Containers Help!!!

2. Custom Control: Container inside container...

3. Moving Controls from Container to Container

4. Custom Control: Container inside container...

5. Select Names dialog box opens, need help getting the recipients into strings

6. Help defining CC recipients

7. Help with File/Send To Recipient

8. Select Names dialog box opens, need help getting the recipients into strings

9. Help! with containers and a phantom table

10. Help needed with Visio in OLE container in VB6

11. Container.Add help!

12. Please Help.....Container and Module questions

 

 
Powered by phpBB® Forum Software