title: Handle the incoming emails using vbscript
body: <p><strong>Problem</strong>: Handle the incoming emails using vbscript. </p>
  
  <p><strong>Outlook Version</strong>: Outlook 2000</p>
  
  <p><strong>Description</strong>: I cannot use VBA for this as I believe  Outlook 2000 doesn't let you run a VBA script from the rules wizard and hence I have to use the <code>Run a Program | VBScript</code> method.</p>
  
  <p><strong>What I know</strong>: I know how to handle email from VBA like this</p>
  
  <pre><code>Sub Sample(MyMail As MailItem)
      Dim strID As String, olNS As Outlook.NameSpace
      Dim olMail As Outlook.MailItem
  
      strID = MyMail.EntryID
      Set olNS = Application.GetNamespace("MAPI")
      Set olMail = olNS.GetItemFromID(strID)
  
      '~~&gt; Rest of the code
  
      Set olMail = Nothing
      Set olNS = Nothing
  End Sub
  </code></pre>
  
  <p>I also know how to run the vbscript on the email which is <strong>already in</strong> the inbox. To run a vbscript in OL2000, you have to use <code>Run A Program</code> and point it to the vbs file. The <code>Run A Script</code> is not available in OL2000.</p>
  
  <p><strong>What I do not know</strong>: And this is where I need help. How to get the mail object which has not hit the mail inbox in VBS. Once I get the object then I can do the rest of the necessary operations.</p>