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

  • Thread starter RmVycmljaWVhbg
  • Start date Views 2,493
R

RmVycmljaWVhbg

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 "example@testcomp.com".

If I create an exception rule for using .Exceptions.From, and

> .Recipients.Add ("example@testcomp.com")... then Outlook, when receiving the

rule from the macro, automatically translates that into something like "DL

Company Group", rather than keeping it as "example@testcomp.com"... 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!
 
R

RmVycmljaWVhbg

Solved:

Dim test As Outlook.AddressRuleCondition

Set test = oRule.Exceptions.SenderAddress

With test

> Enabled = True

> Address = Array("test")

End With

"Ferriciean" wrote:


> 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 "example@testcomp.com".

> If I create an exception rule for using .Exceptions.From, and
> .Recipients.Add ("example@testcomp.com")... then Outlook, when receiving the
> rule from the macro, automatically translates that into something like "DL
> Company Group", rather than keeping it as "example@testcomp.com"... 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!
 
R

RmVycmljaWVhbg

Solved:

Dim test As Outlook.AddressRuleCondition

Set test = oRule.Exceptions.SenderAddress

With test

> Enabled = True

> Address = Array("test")

End With

"Ferriciean" wrote:


> 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 "example@testcomp.com".

> If I create an exception rule for using .Exceptions.From, and
> .Recipients.Add ("example@testcomp.com")... then Outlook, when receiving the
> rule from the macro, automatically translates that into something like "DL
> Company Group", rather than keeping it as "example@testcomp.com"... 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!
 

Top