{"id":126,"date":"2013-12-13T08:24:27","date_gmt":"2013-12-13T08:24:27","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=126"},"modified":"2013-12-13T08:24:27","modified_gmt":"2013-12-13T08:24:27","slug":"make-outlook-asking-if-you-want-to-send-bcc-a-sent-message","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/make-outlook-asking-if-you-want-to-send-bcc-a-sent-message\/","title":{"rendered":"Make Outlook asking if you want to Send-BCC a sent Message"},"content":{"rendered":"<p><code>Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)<\/p>\n<p>Dim ans<br \/>\nans = MsgBox(\"Send this message bcc to xyz?\", vbYesNoCancel)<br \/>\nIf ans = vbCancel Then Cancel = True<\/p>\n<p>If ans = vbYes Then<br \/>\n    Dim objRecip As Recipient<br \/>\n    Dim strMsg As String<br \/>\n    Dim res As Integer<br \/>\n    Dim strBcc As String<br \/>\n    On Error Resume Next<br \/>\n    ' #### USER OPTIONS ####<br \/>\n    ' address for Bcc -- must be SMTP address or resolvable<br \/>\n    ' to a name in the address book<br \/>\n    strBcc = \"user@domain.com\"<br \/>\n    Set objRecip = Item.Recipients.Add(strBcc)<br \/>\n    objRecip.Type = olBCC<br \/>\n    If Not objRecip.Resolve Then<br \/>\n        strMsg = \"Could not resolve the Bcc recipient. \" & _<br \/>\n        \"Do you want still to send the message?\"<br \/>\n        res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _<br \/>\n        \"Could Not Resolve Bcc Recipient\")<br \/>\n        If res = vbNo Then<br \/>\n            Cancel = True<br \/>\n        End If<br \/>\n    End If<br \/>\n    Set objRecip = Nothing<br \/>\nEnd If<\/p>\n<p>End Sub<br \/>\n<\/code><\/p>\n<p>another version:<\/p>\n<p><code>Public Sub SetBCC2()<\/p>\n<p>    Dim objItem As Outlook.MailItem<br \/>\n    Dim objRecip As Recipient<br \/>\n    Dim strMsg As String<br \/>\n    Dim res As Integer<br \/>\n    Dim strBcc As String<br \/>\n    'On Error Resume Next<\/p>\n<p>    Set objItem = ActiveExplorer.Application.ActiveInspector.CurrentItem<\/p>\n<p>    objItem.Recipients.ResolveAll<\/p>\n<p>    For Each Recipient In objItem.Recipients<br \/>\n    If (Recipient.Type = olBCC) Then<br \/>\n     If Recipient = \"sent@profiline-berufsmode.ch\" Then<br \/>\n       Already = True<br \/>\n     End If<br \/>\n    End If<br \/>\n    Next Recipient<\/p>\n<p>    If Already = False Then<br \/>\n    ' MsgBox (\"noch nicht drauf, also adde ich jetzt\")<br \/>\n        strBcc = \"sent@tastaturkind.ch\"<br \/>\n        Set objRecip = objItem.Recipients.Add(strBcc)<br \/>\n        objRecip.Type = olBCC<br \/>\n        objRecip.Resolve<br \/>\n        Set objRecip = Nothing<br \/>\n    End If<\/p>\n<p>End Sub<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim ans ans = MsgBox(&#8222;Send this message bcc to xyz?&#8220;, vbYesNoCancel) If ans = vbCancel Then Cancel = True If ans = vbYes Then Dim objRecip As Recipient Dim strMsg As &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/make-outlook-asking-if-you-want-to-send-bcc-a-sent-message\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-126","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":0,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/126\/revisions"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}