vba to change Outlook so all emails from SuperDomain.com are red in current Inbox view in 10 client computers.

We have 10 computers using outlook 2010 and 2013. The computers are already configured to run VBA, and the programs are centrally managed in a "Master" vbaProject.otm which is copied daily to each client computer. We are not using MS Exchange.

I want to enforce a new "rule" about email colors: whenever an email comes from @superdomain.com or @goodcustomer.net it should show as red in the Inbox on every computer.

I create the rule view use >ribbon > View tab > Current View group > View Settings > Conditional Formatting > Click "Add" to create a view named "Good Domains"
I then use Font to select red
and Condition > Advanced to create two rules  "From contains superdomain"  and "From Contains GoodCustomer"

Perfect.  But now I want to get all 10 computers to honor the new rule view.

Some forums suggest sharing the colorful view with some variation of the following:

1) modify a "master" computer's view as desired.  (It is probably best to modify all 6 views shown in Manage Views.)
2) copy the views to an NearlyEmpty.PST which then gets copied to each client
3) each client then imports that view and applies it to their Inbox.


But that means most of the people will see significant changes to their current Inbox view.   Favorite columns might disappear, and other columns might resize etc.

To avoid this, I might simply go to each computer, open the Inbox then manually key in the desired changes for SuperDomain and GoodCustomer.  

But, if I ever want to add @AnotherCustomer.com, I must repeat the manual setup 10 times.

So, a better solution would be to have my vba Application_startup subroutine automatically change the inbox view to enforce that rule, while not changing anything else that the user sees.

I hope someone here has some code to get me started on this.

rberke
LVL 5
rberkeConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pavel NagaevLead email system administratorCommented:
I suppose you can fin solution in this way "Powershell+Outlook"

https://msdn.microsoft.com/en-us/magazine/dn189202.aspx

and probably  the simplest and  best way is to prepare manual for users how to add domains to conditional formatting.
0
rberkeConsultantAuthor Commented:
I am afraid my post may have confused you and caused you to posts a solution that uses Powershell to automate the Outlook Rules Wizard.
That Wizard (and the underlying object module) do not have options for turning messages Red.

 When I said "I want to create a rule" I should have said "I want to create a custom view".

I will leave this question open for a short while, then I will delete it and repost with a clearer description of my problem.
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
The keyword for this is AutoFormatRules. Is the description at https://msdn.microsoft.com/en-us/library/ff868080.aspx sufficient for you to work out yourself how to add/change the rule?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rberkeConsultantAuthor Commented:
that link got me going and I will post it once I have tested it on all office computers. In the meantime, I am closing this problem.

Thanks for the help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.