Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook & MailLists
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Outlook & MailLists
Miscellaneous
Thread ID:
00401749
Message ID:
00401749
Views:
68
I try to create a new distribution list to Outlook from VFP6. I can create the distribution list, but I'm not able to fill it with members - e-mail addresses. Here's my code:

m.oTempMailItem=ThisForm.oOutlook.Createitem(0)
m.oRecipients=m.oTempMailItem.Recipients

m.oDstList=m.destFolder.Items.Add(7) && 7 = Distrib.list
with m.oDstList
.DLName=alltrim(ThisForm.Container1.TextBox_1.Text)
select address
scan
m.oNewRep=m.oRecipients.Add(allt(address.CompanyName))
m.oNewRep.Address=allt(address.EmailAddress)
endscan
.AddMembers(m.oRecipients)
.Save() && this finally saves the distribution list to Outlook
endwith

I can't assign the recipient's name. When I add a new member manually in Outlook, I can see it within the recipient object, but can't change it from FoxPro.
What am I doing wrong?
Thanks in advance for any ideas.
Reply
Map
View

Click here to load this message in the networking platform