title: Deleting an email when subject contains certain words
body: <p>At work I use Microsoft Outlook, and I've run out of space for outlook rules.</p>
  
  <p>I'm trying to create a VBA procedure that will check my email as I get it, and if there is a email with a specified string in the subject it will delete it.</p>
  
  <p>This is what I tried to code but I couldn't get it to work:</p>
  
  <pre><code>Public Sub process_email(itm As Outlook.MailItem)
      Dim new_msg As MailItem
  
      If new_msg.subject Like "*keyword*" Then
          new_msg.Delete
      End If
  End Sub
  </code></pre>