C
cmoietvous
Hi All
Well im beginning to pull my hair out! - All I want to do is to create
an Outllok personal distribution list using a .vbs file, here is the code I
have so far, it creates the DL but fails to add the single recipient to the
DL :
Dim CdoSession
Dim CdoAddressLists
Dim CdoAddressList
Dim CdoAddressEntries
Dim CdoAddressEntry
Dim CdoAddressEntriesColl
Dim CdoAddressEntryNewMember
' Create a new Session object and log on.
Set CdoSession = CreateObject("MAPI.Session")
CdoSession.Logon
' Get the Personal Address Book's AddressEntries collection
Set CdoAddressLists = CdoSession.AddressLists
Set CdoAddressList = CdoAddressLists.Item("Contacts")
Set CdoAddressEntries = CdoAddressList.AddressEntries
' Add a new entry for the distribution list.
Set CdoAddressEntry = CdoAddressEntries.Add("MAPIPDL", "DL11")
Set CdoAddressEntryNewMember= CdoAddressEntry.Members.Add("SMTP",
"TEST","(e-mail address removed)")
' Save the changes.
CdoAddressEntry.Update
Well im beginning to pull my hair out! - All I want to do is to create
an Outllok personal distribution list using a .vbs file, here is the code I
have so far, it creates the DL but fails to add the single recipient to the
DL :
Dim CdoSession
Dim CdoAddressLists
Dim CdoAddressList
Dim CdoAddressEntries
Dim CdoAddressEntry
Dim CdoAddressEntriesColl
Dim CdoAddressEntryNewMember
' Create a new Session object and log on.
Set CdoSession = CreateObject("MAPI.Session")
CdoSession.Logon
' Get the Personal Address Book's AddressEntries collection
Set CdoAddressLists = CdoSession.AddressLists
Set CdoAddressList = CdoAddressLists.Item("Contacts")
Set CdoAddressEntries = CdoAddressList.AddressEntries
' Add a new entry for the distribution list.
Set CdoAddressEntry = CdoAddressEntries.Add("MAPIPDL", "DL11")
Set CdoAddressEntryNewMember= CdoAddressEntry.Members.Add("SMTP",
"TEST","(e-mail address removed)")
' Save the changes.
CdoAddressEntry.Update