I've added a custom column called "Ext" to my Inbox view in "View / View Settings / Columns...". Using VBA, I'd like to set that value to "***" for every email received from an external sender.
With some other code I got from this site, the subroutine below fires at the right time, and I see the message box when the email comes from outside my org, and I don't see it if it's from inside my org.
But nothing I've tried will fill in the new column in my Inbox view. I assume I'm missing the relationship between adding a custom column and creating a user-defined property. Any help would be much appreciated.
Private Sub objNewMailItems_ItemAdd(ByVal Item As Object)
If Item.Class <> olMail Then Exit Sub
If (InStr(Item.SenderEmailAddress, "@")) Then
MsgBox ("Out: " & Item.SenderEmailAddress)
End If
End Sub
With some other code I got from this site, the subroutine below fires at the right time, and I see the message box when the email comes from outside my org, and I don't see it if it's from inside my org.
But nothing I've tried will fill in the new column in my Inbox view. I assume I'm missing the relationship between adding a custom column and creating a user-defined property. Any help would be much appreciated.
Private Sub objNewMailItems_ItemAdd(ByVal Item As Object)
If Item.Class <> olMail Then Exit Sub
If (InStr(Item.SenderEmailAddress, "@")) Then
MsgBox ("Out: " & Item.SenderEmailAddress)
End If
End Sub