Hello,
I copied the following code from another purpose, and tweaked it so that it always asks me if I want to prefix the Subject line, whenever I send an email. It works lovely, except I don't know how to get rid of the feature that sends a bcc email to me@domain.com.
I'm sure someone can tell me how to remove that feature.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
strBcc = "me@domain.com"
res = MsgBox("Prefix Subject Line?", vbYesNo + vbDefaultButton1, _
"BCC Message")
If res = vbNo Then
Cancel = False
Else
Dim strTemp As String
Dim strFilenum As Variant
strFilenum = InputBox("Enter Prefix to Subject Line?")
If strFilenum = "" Then
Cancel = True
MsgBox "The file number was blank or you clicked Cancel." _
& vbCrLf & "click Send and select No if you don't want to BCC & add a file number."
Exit Sub
Else
strTemp = "[" & strFilenum & "] " & Item.Subject
Item.Subject = strTemp
Item.Save
End If
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " & _
"Please check the BCC Script configuration. " & _
"Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could not resolve BCC")
If res = vbNo Then
Cancel = True
End If
End If
End If
End Sub
I copied the following code from another purpose, and tweaked it so that it always asks me if I want to prefix the Subject line, whenever I send an email. It works lovely, except I don't know how to get rid of the feature that sends a bcc email to me@domain.com.
I'm sure someone can tell me how to remove that feature.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
strBcc = "me@domain.com"
res = MsgBox("Prefix Subject Line?", vbYesNo + vbDefaultButton1, _
"BCC Message")
If res = vbNo Then
Cancel = False
Else
Dim strTemp As String
Dim strFilenum As Variant
strFilenum = InputBox("Enter Prefix to Subject Line?")
If strFilenum = "" Then
Cancel = True
MsgBox "The file number was blank or you clicked Cancel." _
& vbCrLf & "click Send and select No if you don't want to BCC & add a file number."
Exit Sub
Else
strTemp = "[" & strFilenum & "] " & Item.Subject
Item.Subject = strTemp
Item.Save
End If
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " & _
"Please check the BCC Script configuration. " & _
"Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could not resolve BCC")
If res = vbNo Then
Cancel = True
End If
End If
End If
End Sub