Count the number of VBA recipients in the TO field

萝らか妹 提交于 2021-01-29 16:41:05

问题


Is there a faster method to count the number of VBA recipients in the TO field?

Please refer to the following pseudo code.

Dim myRecipients as Outlook.recipients
Dim Recip as Outlook.recipient

Dim olToCount as Long
    olToCount = 0
For Each Recip In myRecipients
    If Recip.Type = olTo Then
        olToCount = olToCount + 1
    End if
Next

回答1:


You can also read the To property and count the number of ";" characters, but it is locale specific. What you have is the preferable way; is there a problem with it?



来源:https://stackoverflow.com/questions/53511306/count-the-number-of-vba-recipients-in-the-to-field

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!