Automated email generation not resolving multiple recipients

前端 未结 1 537
时光取名叫无心
时光取名叫无心 2021-01-24 02:09

I have a VBA script which creates & saves Draft emails. To add recipients, it pulls a string from a linked Excel table and adds that to the Recipients object.

For e

1条回答
  •  有刺的猬
    2021-01-24 03:15

    Recipients.Add takes a single email address.

    If you wish to have multiple recipients, call Recipients.Add for each one.

    If your string is returned in a ; delimited format, then something like:

    dim EmailList as variant
    dim NumEmails as long
    dim AddEmailLoop as long
    
    EmailList=split(StrEmailTo,";")
    NumEmails=UBound(EmailList)
    
    For AddEmailLoop=0 to NumEmails
        Recipients.add(EmailList(AddEmailLoop))
    next
    

    should allow you to add the entire list

    0 讨论(0)
提交回复
热议问题