Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook help

Status
Not open for further replies.

axism

MIS
May 17, 2005
58
i have the following code:
Code:
Dim olapp As New Outlook.Application
Dim namespace As Outlook.namespace
Dim folder As Outlook.MAPIFolder
Dim folderitems As Outlook.Items
Dim totalcounts As Integer
Dim contactcount As Integer
Dim tempdist as  DistListItem

Set namespace = olapp.GetNamespace("MAPI")
Set folder = namespace.GetDefaultFolder(olFolderContacts)
Set folderitems = folder.Items

Set tempdist = "ABC"
totalcounts = = tempdist.MemberCount

For contactcount = 1 To totalcounts
    msgbox tempdist.GetMember(iteraddress).Name
next contactcount

End sub

my question ism if i have a distribution list name like "abc" in my contact list in outlook, can i just use the set tempdist above and use that loop to retrieve all members in that dist list?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top