title: Encrypting attachments before sending mails
body: <p>I want to make sure that all mails I send with an attachment are encrypted. So is it possible to set this up in Outlook with <code>VBA</code>. Automatically encryption or something?</p>
  
  <p>Alternatively maybe someone can help me with this:</p>
  
  <p>So far I have made this code, which creates a pop-up (greater than 2 because I have 2 attachments in my signature):</p>
  
  <pre><code>Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
      Dim strSubject As String
      Dim lngAttach As Long
      Dim strPrompt As String
      strSubject = Item.Subject
      lngAttach = Item.Attachments.Count
  
      If lngAttach &gt; 2 Then
          strPrompt = "Have you encrypted the file?"
  
          If MsgBox(strPrompt, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check") = vbNo Then
              Cancel = True
          End If    
      End If
  
  End Sub
  </code></pre>
  
  <p>If I want it to open the attached file automatically if the answer is no, how do I make that?</p>