title: Outlook VBA script will not run
body: <p>I created a VBA script in Outlook 2010 but the only way it will run is by clicking on the play button while in Outlook VBA as indicated in the image below:</p>
  
  <p><img src="https://i.imgur.com/2xlO8hb.png" alt="VBA"></p>
  
  <p>Why won't it run when I select the VBA script from the menu as indicated in the image below? I have already signed the VBA script by using "SelfCert.exe".</p>
  
  <p><img src="https://i.stack.imgur.com/k3huK.png" alt="macro menu"></p>
  
  <p>The other two VBA scripts in the list do run when they are selected from the menu. Below is the code of the VBA script that does not run:</p>
  
  <pre><code>Sub ReplaceIPs()
      Dim Insp As Inspector
      Dim obj As Object
  
      Set Insp = Application.ActiveInspector
      Set obj = Insp.CurrentItem
  
      obj.HTMLBody = Replace(obj.HTMLBody, "192.168.1", "255.255.255")
  
      Set obj = Nothing
      Set Insp = Nothing
  End Sub
  </code></pre>
  
  <p>The above VBA script is supposed to find and replace all instances of "192.168.1" with "255.255.255" in the body of the email that is being composed.</p>