VBA to Copy Rule to All Accounts in Outlook (1 Viewer)

Mohsin Malik

Registered User.
Local time
Today, 12:23
Joined
Mar 25, 2012
Messages
175
Hello,

I am working on something to automate Outlook Rules through Access/Excel VBA, if I am to create Outlook Rule for Single Account it works fine. Is there a way to create Outlook Rule for All Accounts through VBA, I can see this option on Rule Creation Wizard but I am not sure that how can I enable/check this option through VBA (check Screenshot1.JPG).

Is there any way to Copy Outlook Rule from one account to all other accounts through VBA? I can see this option in [Rules and Alerts] popup but not sure that how to accomplish this with VBA? (check Screenshot2.JPG). I will appreciate any help with this.

Thank you
Mohsin
 

Attachments

  • Screenshot1.jpg
    Screenshot1.jpg
    47.9 KB · Views: 49
  • Screenshot2.jpg
    Screenshot2.jpg
    51.3 KB · Views: 48

sonic8

AWF VIP
Local time
Today, 09:23
Joined
Oct 27, 2015
Messages
998
Is there any way to Copy Outlook Rule from one account to all other accounts through VBA?
I don't think there is a built-in method to copy rules, but it should be possible to create a new rule in one store and set all its properties to the values read from a rule in another store.



The documentation for the Rules.Create Method comes with a pretty extensive code sample.
 

Mohsin Malik

Registered User.
Local time
Today, 12:23
Joined
Mar 25, 2012
Messages
175
I don't think there is a built-in method to copy rules, but it should be possible to create a new rule in one store and set all its properties to the values read from a rule in another store.


The documentation for the Rules.Create Method comes with a pretty extensive code sample.

Thanks, I can see a built-in methods in Outlook 2016 to copy rule from one store to another but did not find VBA code snippet to do that? Can you please advise on property that set rule to be created on all accounts?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:23
Joined
Feb 28, 2001
Messages
27,001
I am sure there are security settings to prevent that. Like most modern versions of both Windows and Office products, it is much easier for user X to copy user Y's rules (into the X rules) but it is NOT so easy to allow imposition of user X's rules on user Y. I.e. you can PULL rules but would have a very hard time PUSHING rules.

There are ways to grant other persons certain rights, but I don't recall playing with the rights associated with rule imposition. Look at this article.

https://support.office.com/en-us/ar...calendar-41c40c04-3bd1-4d22-963a-28eafec25926

I think you have to persuade the proposed recipients to grant you "Editor" rights over their e-mail, but I have not played with this because at my site, I was not a mail admin. I was a database admin, and with U.S.A. Dept. of Defense sites, you just DON'T step out of your role too often. So I never got the chance to do this.

This is where you have to start, because if you don't have permission, you will NOT be able to do what you want. And I'm not talking about permission from your boss. This is a per-person setting.

I found one more article that might be helpful.

https://kb.intermedia.net/Article/720
 

Users who are viewing this thread

Top Bottom