Consulting

Results 1 to 2 of 2

Thread: VBA code

  1. #1

    VBA code

    In my Outlook To Colum, i have some email recipients

    My VB code, expect to read the email address , but it read the name.... how can i change the code so it reading the email address correctly?

    My VBA code as below:
    ------------------------
    :
    On Error Resume Next
    Set Recipients = Item.Recipients
    For i = Recipients.Count To 1 Step -1
    Set recip = Recipients.Item(i)
    If (InStr(LCase(recip), "yahoo.com")) > 0 Then
    yahoo_Domain_Count = yahoo_Domain_Count + 1
    ElseIf (InStr(LCase(recip), "gmail.com")) > 0 Then
    gmail_Domain_Count = gmail_Domain_Count + 1
    End if
    Next i
    Last edited by Aussiebear; 06-21-2022 at 01:47 PM. Reason: Added code tags to supplied code

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •