Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
  2. Dim objRecip As Recipient
  3. Dim strMsg As String
  4. Dim res As Integer
  5. Dim strBcc As String
  6. Dim intresponse As Integer
  7. On Error Resume Next
  8.  
  9. intresponse = MsgBox("Do you want to send to Pipedrive?", _
  10. vbYesNo + vbQuestion, _
  11. "Email Privacy")
  12. If intresponse = vbYes Then
  13.  
  14. strBcc = "xcerionz@pipedrivemail.com"
  15. Set objRecip = Item.Recipients.Add(strBcc)
  16. objRecip.Type = olBCC
  17.  
  18. If Not objRecip.Resolve Then
  19. strMsg = ("Oops")
  20. If res = vbNo Then
  21. Cancel = True
  22. End If
  23. End If
  24. End If
  25. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement