Adding to a distibution list via Redemption DLL

A

Andy Rigby

Hi

I've just started using Redemption to access Outlook from VB and I've
got basic sending and receiving emails working fine.

However, I want to add people into an existing distribution list, and
can't seem to get anything to add into the list.

Office 2000, SP3

My code is like this. I don't get any errors but the (empty) list
never grows:

Dim oOutDist As Outlook.DistListItem
Dim OutDist As Object
Dim OutRecip As Object
Dim oOutRecip As Outlook.Recipients
Dim OutMail As Object
Dim oOutMail As Object
Dim OutFold As Object

Set OutFold = OutNS.GetDefaultFolder(olFolderContacts)
Set oOutDist = OutFold.Items("Name Of The List I Want To Add To")
Set OutMail = CreateObject("Redemption.SafemailItem")
Set oOutMail = OutApp.CreateItem(0)
OutMail.Item = oOutMail
Set OutRecip = OutMail.Recipients

Set OutDist = CreateObject("Redemption.SafeDistlist")
Set OutDist = oOutDist
OutRecip.Add "Email Address I Want To Add"
OutDist.AddMembers OutRecip
OutDist.Save

Set OutDist = Nothing
Set OutMail = Nothing


Any ideas?

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top