Question : Automatically add subject title

Hi Experts,

I need Experts help to create a script to add “TK:” at subject line whenever creates a new email. Hope Experts could help.


Answer : Automatically add subject title

If using outlook 2007 then:

At the top of thisOutlookSession but after option ... (if present) place the line, (unless itself already present):

Private WithEvents olkMailItem As Outlook.MailItem

Now paste the snippet for Application_ItemLoad ... if the sub already exists then simply make sure the specific line is therein.

Similarly paste the snippet for olkMailItem_Open ... if the sub already exists then simply make sure the specific line is therein.

Chris

1:
2:
3:
4:
5:
6:
7:
Private Sub Application_ItemLoad(ByVal Item As Object)
    If Item.Class = olMail Then Set olkMailItem = Item
End Sub

Private Sub olkMailItem_Open(Cancel As Boolean)
    If olkMailItem.Subject = "" Then olkMailItem.Subject = "TK: "
End Sub
Random Solutions  
 
programming4us programming4us