With Outlook 2000/2003, I can manually create a distribution list, which contains several email addresses that are not related to any contacts in the Contacts folder.
However, I could not figure out how to do that using VBA. What I am trying to do is to programmingly create a distribution list, which contains email addresses list generated from an Access database.
That's what I got so far.
Any suggestions?
Thanks in advance.
Seaport
However, I could not figure out how to do that using VBA. What I am trying to do is to programmingly create a distribution list, which contains email addresses list generated from an Access database.
That's what I got so far.
Code:
Set myOlApp = CreateObject("Outlook.Application")
Set myDistList= myOlApp.CreateItem(olDistributionListItem)
myDistList.DLName = "Test"
Set myTempItem = myOlApp.CreateItem(olMailItem)
Set myRecipients = myTempItem.Recipients
'Here is my problem. When I tried to add a Recipient object
'to the Recipients collection, I could not create a
'Recipient object, which just contains a name and an address
'and is not related to any contact in the Contacts folder.
myDistList.AddMembers myRecipients
myDistList.Display
Any suggestions?
Thanks in advance.
Seaport