title: Working with current open email
body: <p>I would like to get the active opened MailItem (whether it's a new mail or a received mail). I need to add some content to that mail when the user runs my macro. I'm using Outlook 2003 and VBA.</p>
  
  <p>I found this: <a href="https://stackoverflow.com/questions/4134967/how-do-you-get-a-reference-to-the-mail-item-in-the-current-open-window-in-outloo">How do you get a reference to the mail item in the current open window in Outlook using VBA?</a> It doesn't work however because <code>TypeName(Application.ActiveWindow)</code> is set to nothing. I also tried <code>Set Mail = Application.ActiveInspector.currentItem</code> but it doesn't work either.</p>
  
  <p>There must be something I don't understand about the <em>ActiveInspector</em> thing.</p>
  
  <p><strong>As requested, this is the procedure/macro located in a dedicated module, called when the user click on a menu-button added in the <code>Application_Startup()</code> method</strong>:</p>
  
  <pre><code>Sub myMacro()
      Dim NewMail As Outlook.MailItem
      Set NewMail = Application.ActiveInspector.currentItem
  End Sub
  </code></pre>