• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Rules Wizard does not exit when run in a macro

I am using the below macro to run my rules wizard but I when I add on any {ESC} or {TAB}{ENTER} to then close the window after I run the command it doesn't work - it just leaves the window open. Could anyone assist to close the window (and then the next one) after the command has run?

SendKeys "%Tl{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}{TAB}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{DOWN}{+}{TAB}{TAB}{TAB}{TAB}{ENTER}", True
0
cjrsheldrick
Asked:
cjrsheldrick
1 Solution
 
aeklundCommented:
What's happening is that the window that is being displayed is a dialog type message and when this type is displayed it stops all the code that is running.

You would have to compile your macro into an external .exe file and call it from your macro.  This way outlook cannot stop the code since it is in another process.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now