I am trying to automatically fill the salutation in my mails depending on the recipient.
To start this routine I use the event MailItem_PropertyChange which is gives back the name of the changed property.
At any change of the "To" field the event handler fires three times.
The first time it gives back the name "To".
The second time it gives back the name "CC".
The third time it gives back the name "BCC".
This means, no matter which one of the three values I change, my routine always acts as if I changed the To value.
Private Sub objMail_PropertyChange(ByVal Name As String)
If Name = "To" Then
objMail.htmlBody = "Hallo Zusammen" & objMail.htmlBody
End If
End Sub
Yes, because 3 properties (potentially) change.