vba rule exception "except with specific words in the sender's add

  • Thread starter Thread starter Ferriciean
  • Start date Start date
F

Ferriciean

I've created a macro which creates a number of specific folders and rules, so
as to standardize the way my group sorts emails. The problem I'm having is
that we have auto-generated emails, created by our ticketing application,
which will send emails such as "(e-mail address removed)".

If I create an exception rule for using .Exceptions.From, and
..Recipients.Add ("(e-mail address removed)")... then Outlook, when receiving the
rule from the macro, automatically translates that into something like "DL
Company Group", rather than keeping it as "(e-mail address removed)"... and
therefore the exception is rendered useless. (For whatever reason, Exchange
doesn't translate the sender address on auto-generated emails from the
ticketing app).

So... my way around it is to create an exception using the "except with
specific words in the sender's address", and actually write out the email
addy.

I need to know how to do this; I can't, for the life of me, find this
exception in VBA =).

Thanks for your help!
 
Solved:

Dim test As Outlook.AddressRuleCondition

Set test = oRule.Exceptions.SenderAddress
With test
.Enabled = True
.Address = Array("test")
End With
 
Solved:

Dim test As Outlook.AddressRuleCondition

Set test = oRule.Exceptions.SenderAddress
With test
.Enabled = True
.Address = Array("test")
End With
 
Back
Top