I am trying to automatically execute this workflow:
- when a user opens a draft message in Outlook ( generated eml file )
- If the object matches the string (immutable, known in advance, I cannot change it, it's something like
xyžřy, pay attention to characters other than ASCII): - then add the email to the BCC field (fixed, known in advance, valid email address, say
baz@example.com)
I already know the last part - how to add BCC to the post , and I use InStr to match:
Sub addbcc()
Dim objRecip As Recipient
Set oMsg = Application.ActiveInspector.CurrentItem
With oMsg
If InStr(1, oMsg.Subject, "xyžřy") > 0 Then
Set objRecip = oMsg.Recipients.Add("baz@example.com")
objRecip.Type = olBCC
objRecip.Resolve
End If
End With
Set oMsg = Nothing
End Sub
, - , , , , BCC . ?