title: "Sub or Function not defined" when trying to run a VBA script in Outlook
body: <p>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 <a href="http://msdn.microsoft.com/en-us/library/ee814736(v=office.14).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ee814736(v=office.14).aspx</a>. The macro is very simple:</p>
  
  <pre><code>Sub Test()
     MsgBox ("Hello world")
  End Sub
  </code></pre>
  
  <p>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).</p>
  
  <p>How can I make the VBA script 'accessible' to Outlook?</p>
  
  <p><img src="https://i.stack.imgur.com/iNAvn.jpg" alt="Running the &quot;Test&quot; macro in Microsoft Outlook">
  Figure 1  Running the "Test" macro in Microsoft Outlook</p>
  
  <p><img src="https://i.stack.imgur.com/CMlQj.jpg" alt="enter image description here">
  Figure 2  "Sub or Function not defined" error, with module tree in the background</p>