Applying rules to email generated from MS Access by VBA

Not open for further replies.


Outlook version
Email Account
Hello, and apologies if this has been asked before but my searches have so far proved fruitless.

I create approx. 500 Excel and Word documents every week for various recipients throughout the company that I work for. One of the head honchos has asked to be cc'd on all of these for this week only to determine the worth of continuing this way.

The documents are all created via an MS Access Database and VBA scripts to send the individual reports via Outlook. Initially, I was going to add my boss as a recipient on every single one - simple but time consuming. Then I had the idea of creating a Rule in Outlook to automatically send a copy of every outgoing email to her. Set it up in no time and a couple of tests worked perfectly.

Unfortunately, the rule does not seem to be working on the emails being created outside of the outlook environment i.e. the VBA scripting from Access. Even trying to run the rule manually over the Sent Items box does not work.

As I'm writing this, I've just remembered that we have the little program that "avoids" the pop-up security message when trying to send emails via VBA - would this be impacting the Rules in any way? And if not, does anyone know what else would be preventing the rule from working?

Any help would be greatly appreciated - even just confirmation that it can't be done this way.:confused:

Many Thanks

Tracey L

Brisbane, Aus
You'll need to use VBA to do this - the rules work on mail sent from outlook but mail generated from other programs bypass rules. This should work - Automatically BCC All Messages - Slipstick Systems - use olCC instead of olBCC if you want to cc
Hi Diane - thanks heaps for the reply.

Unfortunately, that solution is not going to help me as each report is created by its' own VBA module. I'd have go and manually update them all which is what I was hoping to avoid.

At least I know it can't be done this way. Thanks again for replying so quickly :D
That is an outlook auto-run macro, so it should work with mail generated by other macros or by outside programs.
Ohh.. gotcha - sorry, misunderstood. I've now added it to my Outlook VBA and seems to be working perfectly - thanks!
I spoke too soon - this is working on emails created in Outlook itself. Anything generated in Access via the VBA code is still bypassing all rules and this new script.

Thanks anyway for your assistance.
Hmm. I know some things won't work because of how the other applications access outlook, but I thought it hit outlook soon enough for this to catch it. (I use an itemsend with a mail merge in word.)
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
L Applying new form to existing contacts -- MessageClass Outlook VBA and Custom Forms 3
W Outlook 2016 search problem persists after applying all known solutions Using Outlook 12
moks applying a rule to the message body only Using Outlook 1
R How to simplify rules Using Outlook 2
J Recover server side rules from OST/PST without access to the server Using Outlook 2
J Outlook Rules VBA Run a Script - Multiple Rules Outlook VBA and Custom Forms 0
N Outlook 2021 'Run Script" Rules? Outlook VBA and Custom Forms 4
K Multiple Rules on Single Email Using Outlook 2
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
R rules not working - done troubleshooting Using Outlook 0
P Outlook 2013 All imported Mail Rules in error when imported into new profile Using Outlook 5
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
Wayne Outlook locks up when opening "Manage Rules & Alerts" Using Outlook 7
T "Words In Recipient's Address" Rule Causes Outlook To Stop Processing Rules Using Outlook 3
Retired Geek Junk Folder Clean Up Rules Exchange Server Administration 1
B Setting rules Using Outlook 1
A rules not working Using Outlook 2
M Rules and autoreply Using Outlook 1
N Outlook rules don't create a copy for bcc'ed emails Using Outlook 3
O How to recover rules after switch from POP3 to IMAP Using Outlook 2
N Focussed Inbox Rules Failing Using Outlook 5
N Copies of emails from rules have wrong from: account Using Outlook 0
L Office 365 cloud based rules Using Outlook 1
K Outlook Rules: Move a Copy Using Outlook 4
CWM030 Rules disappearing in OL 2016? ( Yes, I searched before posting) Using Outlook 7
R When rules lose track of "specified folder" Using Outlook 6
I Outlook 2013 Rules - (client only) Using accounts in Outlook 1
B When I add more search strings to RULES, it is not processing them Using Outlook 3
O Having rules run on old mails noved to inbox Outlook VBA and Custom Forms 8
A rules (flags) not working Using Outlook 7
K Lost Rules. Assistant accesses my mailbox. Disappeared Using Outlook 0
soadfan Outlook rules look up display name only Using Outlook 4
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1
Justo Horrillo Issue with rules in Outlook 2010 Using Outlook 4
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
R When rules are working but invisible and unmanageable Using Outlook 2
P Transport Agent or Rules/Connectors Exchange Server Administration 1
A Rules - how to determine if all conditions in rule are true or false Outlook VBA and Custom Forms 5
E Outlook 2010 need help with rules Using Outlook 0
O Rules and Alerts for New Messages BEFORE sending Using Outlook 2
D Outlook Rules Using Outlook 1
Diane Poremsky Autoaccept a Meeting Request using Rules Using Outlook 2
K adding more rules to 'different domains check' macro Outlook VBA and Custom Forms 2
Gunny NFOhiway Outlook PST file and Rules Using Outlook 1
M Outlook 2016 Rules Not Working Automatically Using Outlook 5
Diane Poremsky Rules & Alerts Dialog Won't Open Using Outlook 1
soadfan Enable all rules from toolbar button? Outlook VBA and Custom Forms 3
oliv- How to Run a Script IN AN ADDIN with Outlook's Rules and Alerts Outlook VBA and Custom Forms 2
P Log of Rules that ran Outlook VBA and Custom Forms 3
Q Outlook 2016\365 export specific rules to import in another system Exchange Server Administration 1

Similar threads