title: Outlook Script to Remove Attachments through a rule
body: <p>I am new to both VBA and this forum. To start off let me say that I have spent a considerable amount of time trying to find my answer both by doing and searching. </p>
  
  <p>I need to create a script that I can add to my rules to delete attachments from certain emails. I found this code and thought It would help. </p>
  
  <pre><code>Public Sub deleteAttach(itm As Outlook.MailItem) 
  Dim objAtt As Outlook.Attachment 
  Set objAtt = itm.Attachments
  objAtt.itm(1).Delete
  End Sub
  </code></pre>
  
  <p>Now I can't seem to get this code working. After reading about it, i realized that the itm needs to be an object but somehow if I use <code>Public Sub deleteAttach(ByVal Item As Object)</code> The rule doesn't find my script.  </p>
  
  <p>I have also tried to change the code to <code>objATT.Delete</code></p>
  
  <p>Any help will be much appreciated. Thank you. </p>