问题
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