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

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!
 
F

Ferriciean

Solved:

Dim test As Outlook.AddressRuleCondition

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

Ferriciean

Solved:

Dim test As Outlook.AddressRuleCondition

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top