Enable script containing VBA

Status
Not open for further replies.
Outlook version
Email Account
POP3
1518205896496.png
 
Run a script rules are automatic - they get called by the rule. did you check the macro security setting? An update may have changed it.


Thanks for response.

Not sure I understand completely.

I hadn't used VBA scripts in Outlook 2016. Took me ages to actually find how to. Eventually got running yesterday but today not working. Don't think Microsoft has actually changed anything / update since yesterday. Suspect some settings have gottten reset .

I guess Microsoft feels security could be compromised but making life so difficult is just a real pain!
 
Thanks for response.

Not sure I understand completely.

I hadn't used VBA scripts in Outlook 2016. Took me ages to actually find how to. Eventually got running yesterday but today not working. Don't think Microsoft has actually changed anything / update since yesterday. Suspect some settings have gottten reset .

I guess Microsoft feels security could be compromised but making life so difficult is just a real pain!

The rule appears to run (no error) - the message gets moved to a new folder but the VBA script appears to be ignored
 
Go to File, options, Trust center and check the macro security setting. It will sometimes work with security set to block macros when you first set up a macro (and not warn you) then die on a restart.
 
Go to File, options, Trust center and check the macro security setting. It will sometimes work with security set to block macros when you first set up a macro (and not warn you) then die on a restart.
Diane thanks for the response.

I have attached 2 files -
1 - showing the Rule - i.e. it moves the file to another folder (which it does) followed by the script which is VBA and takes the item.body and places in a file then creates a file with a list of all files to process. This code has a breakpoint early in the code so I know it never gets started
2 - showing the security settings which I believe you refer to

As previously stated 2 -3 days ago everything worked as required - so just not aware of what may have changed
 

Attachments

  • Outlook_Script01.jpg
    Outlook_Script01.jpg
    43 KB · Views: 707
  • Outlook_Script02.jpg
    Outlook_Script02.jpg
    50.8 KB · Views: 732
showing the Rule - i.e. it moves the file to another folder (which it does) followed by the script which is VBA and takes the item.body and places i
oh.... scripts should do it all. if you have two actions, the script may not run
 
oh.... scripts should do it all. if you have two actions, the script may not run
Diane,

News to me !
I have had several rules constructed in a similar manner - i.e. the basics within the rule and other tasks (unable to complete within a rule) in the script.
I guess I could make the changes but doesn't really answer why I could perform the rule on previous occasions - last week and on older version of Outllook. Unless there is some 'real' reason not to create my rule (which has worked) then I suspect making these changes will not solve the problem.

The creating of a rule in Outlook doesn't mention this restriction / suggestion so far as I am aware. Specifically when creating a rule there is a section
"What do you want to to do with the message?" - there are perhaps 15+ options one is "move to the specified folder [allows you to select a folder]" and a second is "Run a script [allows you to select a script - if present]".

I am sure you are aware of the above but just trying to 'get to a solution'
 
Its hard to say why it worked then and not now, but the advice has always been to use conditions in the rule, actions in the script. The problem is in controlling which action happens first and whether the rule loses control of the message after the first action runs.

Are you using the script in one rule? if you are only moving to one folder, you can add the move to the script easily enough. if you have multiple rules moving messages, you can still do it, but will need to use a new script for each rule.
 
Hi Diane,
Thanks again. Again I notice that '.. the advice...'. I haven't seen any documentation suggesting that all actions are in a script (not to say there isn't any information somewhere). As stated previously to action a script is just one of many options to select with no suggestion that it should be 'the only' selection.

Non the less I have modified the script to make the change but don't know the result just yet. [the email messages are output from an MT4 Forex platform - the Forex market does not operate over the weekend].
 
I don't know if Microsoft ever had it documented, but if they did, the KB article is probably long gone. Programmers who have worked with run a script rules have known about it for years.
I mention it at Outlook's Rules and Alerts: Run a Script and Sue Mosher mentioned it at outlookcode.com.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
G To enable/disable Allow New Time proposals Outlook VBA and Custom Forms 1
Mark Foley Cannot enable add-in in outlook 2010 Using Outlook 0
A How to enable outlook room finder (outlook connector (mapi)) user ? Using Outlook 3
Diane Poremsky Mail-enable Exchange Public Folders Using Outlook 0
soadfan Enable all rules from toolbar button? Outlook VBA and Custom Forms 3
R Enable Office 365 Exchange Online Archive Using Outlook 0
R Enable Office 365 Exchange Online Archive Using Outlook 6
G VBA code to enable a rule based on time of day for a IMAP mail account Outlook VBA and Custom Forms 14
K Macro won't consistently re-enable Outlook VBA and Custom Forms 2
Sarge USMC how do I enable hyperlinks in Outlook 2013 Using Outlook 1
A how to install or enable categories in OL 2013 for calendar and contacts Using Outlook 5
D How do I mail-enable a Public Folder Sub-folder in exchnage 2007 using shell ? Exchange Server Administration 0
H enable textboxes and buttons from received email Using Outlook 1
D How To Enable Undo in Outlook 2007 Tasks Using Outlook 2
S Outlook 2010: How do you enable Contacts' Activities to search archive folders Using Outlook 6
J OL2003 Macro disables itself - looking for way to automate 'enable' Using Outlook 2
J Re-enable the junk mail notification. Using Outlook 6
C How do I enable a link in an e-mail in Outlook 2007? Using Outlook 4
A how to enable macro for addin Outlook VBA and Custom Forms 3
J Enable Sonicwall Outlook VBA and Custom Forms 1
S How do I enable administrator access in Business Contact Manager? BCM (Business Contact Manager) 1
S How to enable scripts to run in a custom form which is forwarded ? Outlook VBA and Custom Forms 1
K How do I eliminate the "Enable Macro" selection? Outlook VBA and Custom Forms 16
C Eliminate need for "Enable Macro" selection Outlook VBA and Custom Forms 7
J Office Ultimate- My outlook doesn't have BCM, how do I enable? BCM (Business Contact Manager) 1
R Script for simplifying spam control Outlook VBA and Custom Forms 8
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 Run a script rule to auto 'send again' on undeliverable emails? Outlook VBA and Custom Forms 1
W Designer Form 2013 and Script ? how ? Outlook VBA and Custom Forms 1
G print attachment straight away; working script edit not working Outlook VBA and Custom Forms 0
G Save attachment run a script rule Outlook VBA and Custom Forms 0
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
G Script does not exist Outlook VBA and Custom Forms 0
G Trigger script without restaring outlook Outlook VBA and Custom Forms 7
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
L Modifying VBA script to delay running macro Outlook VBA and Custom Forms 3
L Need help modifying a VBA script for emails stuck in Outbox Outlook VBA and Custom Forms 6
L VB script only runs manually Outlook VBA and Custom Forms 5
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
D.Moore VB script to Digitaly Sign newly created outlook message Outlook VBA and Custom Forms 2
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
D.Moore VBA script fail after Office 365 update Using Outlook 8
M Outlook 2013 Script Assistance - Save Opened Link with Subject Added Outlook VBA and Custom Forms 1
F Script for zip file attachment Outlook VBA and Custom Forms 1
S Change VBA script to send HTML email instead of text Outlook VBA and Custom Forms 3
Y Outlook 2013 Run A Script Outlook VBA and Custom Forms 4
Z Script to set account? Using Outlook 0
dweller Outlook 2010 Rule Ignores VBA Script Outlook VBA and Custom Forms 2
N VBA Script to Open highlighted e-mail and Edit Message Outlook VBA and Custom Forms 5

Similar threads

Back
Top