"Sub or Function not defined" when trying to run a VBA script in Outlook
outlook, vba
Solution
I solved the problem by following the instructions on msdn.microsoft.com more closely. There, it is stated that one must create the new macro by selecting Developer -> Macros, typing a new macro name, and clicking "Create". Creating the macro in this way, I was able to run it (see message box below).
Problem
As a first step in creating a VBA script to resize a currently selected image to 100% x 100%, I'm trying to reproduce the example in http://msdn.microsoft.com/en-us/library/ee814736(v=office.14).aspx. The macro is very simple: ``` Sub Test() MsgBox ("Hello world") End Sub ``` The VBA script was simply created in "Project1" which opens by default when one presses Alt+F11. However, I keep getting the error "Sub or Function not defined" when trying to run the VBA script (Figures 1 and 2). How can I make the VBA script 'accessible' to Outlook? Figure 1 Running the "Test" macro in Microsoft Outlook Figure 2 "Sub or Function not defined" error, with module tree in the background