Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Obtain list of users in an Outlook group

4 views
Skip to first unread message

MacroMan

unread,
Mar 4, 2003, 1:04:13 PM3/4/03
to
In Outlook you can create a group in which many users can
be added. For example, all users in the Finance department
can be added to a group called "Finance".

You can then send an e-mail to all users in the group
simply by selecting "Finance" from the Global Address Book.

I need sample VBA code to execute from Excel XP to
retrieve all users assigned to a particular group.

Can anyone help me out on this???

Thanks in advance for any assistance...

Greg Koppel

unread,
Mar 4, 2003, 5:59:42 PM3/4/03
to
Sub DisplayMembersOfAlias()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
'Set myAddressList to
'the Global Address List
'within the AddressLists
'collection.
Set myAddressList = myNameSpace.AddressLists("Global Address List")
'Set myAddressEntry
'to the entry in the
'AddressEntries
'collection named
'"My Group" which is
'a distribution list.
Set myAddressEntry = myAddressList.AddressEntries("Finance")
'Display each member in the
'alias.
For Each memberEntry In myAddressEntry.Members
MsgBox memberEntry
Next
End Sub

HTH, Greg

"MacroMan" <x...@worldnet.att.net> wrote in message
news:053e01c2e278$76a28330$2f01...@phx.gbl...

0 new messages