Enable script containing VBA

Status
Not open for further replies.
Outlook version
Outlook 2007
Email Account
POP3
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!
 
Outlook version
Outlook 2007
Email Account
POP3
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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 
Outlook version
Outlook 2007
Email Account
POP3
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

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
 
Outlook version
Outlook 2007
Email Account
POP3
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'
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 
Outlook version
Outlook 2007
Email Account
POP3
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].
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
Thread starter Similar threads Forum Replies Date
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 New Slipstick.com Articles 0
soadfan Enable all rules from toolbar button? Outlook VBA and Custom Forms 3
R Enable Office 365 Exchange Online Archive New Slipstick.com Articles 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
C Enable or install Digital ID for Exchange Users on SBS 2008 Exchange Server Administration 2
M SRV records to enable auto discover for Outlook Anywhere Using Outlook 8
S vb.net exchange 2010 problem with enable-mailbox command Exchange Server Administration 2
P Exchange 2010 - Enable Spam filtering on Hub Transport Server Exchange Server Administration 3
Z Patch / hotfix enable Outlook 2007 to work with Exchange 2010 Archiving Exchange Server Administration 2
I Outlook 2007 Macro/VBE disables How to enable Using Outlook 5
C Enable EmailAddressPolicy via Exchange Shell Exchange Server Administration 2
C How to allow admins to enable ActiveSync and edit address book information in EMC Exchange Server Administration 3
W Outlook was in use; when tried to open today it would not open; pop up with info about e-mails with macros; prompted to enable macros, when doing so; Using Outlook 3
J cannot enable embedded links within received e mails, message sysy this function is disabled please contact your system administrator Using Outlook 1
G How to enable Outlook Anywhere for domain joined clients, enable Exchange ActiveSync, but disable OA Exchange Server Administration 1
M OWA (2003,2007,2010) How to enable or Disable efficiently in Bulk range Like Database/Storage Group/Server Exchange Server Administration 3
Z How to enable Content Filtering for Inbound and Outbound Emails on Exchange 2007? Exchange Server Administration 4
D OAB Offline Address Book generation server and enable web distribution on the Exchange 2010 Client Access server Exchange Server Administration 6
T How do I enable the link feature on my email account that allows me to go directly to a website from Using Outlook 1
J Can't enable Outlook anywhere in a new install of Exchange 2010 Exchange Server Administration 2
V enable a disabled e-mail account Exchange Server Administration 2
R How do I re-enable the confirmation dialog? Using Outlook 4
M Outlook 2007: How to enable my signature when starting an e-mail from MS Excel, Words and Power Point ? Using Outlook 2
S We have forgotten our password to enable Outlook while relocating to a new apartment. Our software is authentic and this PC is a 5 yr old MDG. Details Using Outlook 2
N how can i enable staff to access Exchange Server with Outlook in Exchange mode from internet ? Exchange Server Administration 2
J Enable prompt to save/open attachment Using Outlook 1
T can't enable display online status Using Outlook 4
S Mail-Enable a Public Folder in Exchange Server 2010 Exchange Server Administration 9
M Enable to access outlook 2003 even in safe mode and is giving an error message that Business Contact Manager has encountered a problem Using Outlook 2
P How to Enable Hyperlinks in Outlook 2010 Using Outlook 1
S Could not enable Outlook anywhere in Exchange 2010 Exchange Server Administration 4
E Enable Unified Messaging for a User box is Disabled in Exchange 2010 Management Console Exchange Server Administration 1
A Enable Google Apps Sync Using Outlook 3
J Re-enable the junk mail notification. Using Outlook 6
S How to enable macros in Outlook 2010 Using Outlook 6
M Outlook Anywhere - Enable both NTLM and Basic Authentication Exchange Server Administration 8
C How do I enable a link in an e-mail in Outlook 2007? Using Outlook 4
D how to enable ActiveX and scripting Using Outlook 2
A how to enable macro for addin Outlook VBA and Custom Forms 3
Similar threads


















































Top