We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Sub Main() ' TODO: Replace My DL Name with a valid distribution list name. Dim sDLName As String = "My DL Name" ' Create an Outlook application. Dim oApp As Outlook._Application = New Outlook.Application() ' Get the MAPI namespace. Dim oNS As Outlook.NameSpace = oApp.Session ' Get the Global Address List. Dim oALs As Outlook.AddressLists = oNS.AddressLists Dim oGal As Outlook.AddressList = oALs.Item("Global Address List") Console.WriteLine(oGal.Name) ' Get a specific Distribution List. Dim oEntries As Outlook.AddressEntries = oGal.AddressEntries ' Reference the Distribution List by name. Dim oDL As Outlook.AddressEntry = oEntries.Item(sDLName) Console.WriteLine(oDL.Name) Console.WriteLine(oDL.Address) ' Get all the members of the Distribution List. oEntries = oDL.Members Dim oEntry As Outlook.AddressEntry Dim i As Integer For i = 1 To oEntries.Count oEntry = oEntries.Item(i) Console.WriteLine(oEntry.Name) Next ' Clean up. oEntry = Nothing oEntries = Nothing oGal = Nothing oALs = Nothing oNS = Nothing oApp = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Visual Studio npm||1||29|
|vb.net deleting excel sheet in workbook||11||30|
|How do I get the exit code from the executed .bat to pass back...||11||29|
|Excel VLookup in a macro where returned column changes every month||7||12|