Mikky
02-22-2017, 06:53 AM
Hello Gurus :hi:
I've spent half a day trying to solve this but I'm not getting anywhere fast.
I need to add text to the beginning of all my outgoing messages (new, forwards, replies) and I am using a signature block with pictures so I believe I need to do this in HTML. What I've tried:
- adding the text to my signature block but it adds two lines before the text so I can't start typing straight away.
- using Quickparts but this requires additional mouse clicks before I can type the message. I'm trying to find something automated.
Ideally, I would like to integrate any new code with what I'm already using in ThisOutlookSession. This code is:
'Prompt for missing Subject before sending
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Trim(Item.Subject) = "" Then
Cancel = True
MsgBox "The subject is missing", vbInformation
End If
'Add [COMPANY NAME] to Subject for all emails where that text doesn't already exist
If InStr(1, Item.Subject, "COMPANY NAME", vbTextCompare) = False Then
Item.Subject = Item.Subject & " [COMPANY NAME]"
End If
'Send a BCC copy of every Email to yourself, change email address as required
Dim R As Outlook.Recipient
Dim Address$
Address = "email address"
Set R = Item.Recipients.Add(Address)
R.Type = olBCC
R.Resolve
End Sub
I have to be honest, I really have no idea what I'm doing but managed to get things working through trail and error...
Any help that you can provide would be greatly appreciated. A gold star to whoever manages to get it all working together (if that's even possible): pray2:
Thanks in advance.
Mikky
I've spent half a day trying to solve this but I'm not getting anywhere fast.
I need to add text to the beginning of all my outgoing messages (new, forwards, replies) and I am using a signature block with pictures so I believe I need to do this in HTML. What I've tried:
- adding the text to my signature block but it adds two lines before the text so I can't start typing straight away.
- using Quickparts but this requires additional mouse clicks before I can type the message. I'm trying to find something automated.
Ideally, I would like to integrate any new code with what I'm already using in ThisOutlookSession. This code is:
'Prompt for missing Subject before sending
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Trim(Item.Subject) = "" Then
Cancel = True
MsgBox "The subject is missing", vbInformation
End If
'Add [COMPANY NAME] to Subject for all emails where that text doesn't already exist
If InStr(1, Item.Subject, "COMPANY NAME", vbTextCompare) = False Then
Item.Subject = Item.Subject & " [COMPANY NAME]"
End If
'Send a BCC copy of every Email to yourself, change email address as required
Dim R As Outlook.Recipient
Dim Address$
Address = "email address"
Set R = Item.Recipients.Add(Address)
R.Type = olBCC
R.Resolve
End Sub
I have to be honest, I really have no idea what I'm doing but managed to get things working through trail and error...
Any help that you can provide would be greatly appreciated. A gold star to whoever manages to get it all working together (if that's even possible): pray2:
Thanks in advance.
Mikky