Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was following the directions in a great post when I got to the step for selecting the name of the script to run. I have VB code in ThisOutlookSession, but for some reason, the name of the procedure does not appear in the "Select Script" box. I can step through the code in debug mode, so it seems to be syntactically correct. What can be causing it to hide?

share|improve this question

You probably have the wrong parameters in the script. Are you just passing in a MailItem? e.g.

Public Sub MacroName(email As MailItem)
    ' Your code here
End Sub

Once you've compiled it (Debug|Compile), it should show up in Outlook rules as an option. Note that if the parameters are wrong (i.e. you don't pass in just a MailItem) then it won't appear.

share|improve this answer
in the vba editor open the ThisOutlookSession and create a Public sub as rhys mentioned. inside the sub goes your code. make sure to put a proper end on the sub as well. after the code is developed then one of the menu's has a compile and run option. once it is compiled it will show up in outlook as an option. Im assuming you are trying to use it in a rule. if so after the script is compiled it will be available in the custom script action in rules. – Kendrick Sep 13 '12 at 1:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.