Created
November 5, 2012 09:41
-
-
Save stijnsanders/4016337 to your computer and use it in GitHub Desktop.
Outlook script to replace empty subjects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CheckEmptySubject() | |
Dim fi | |
Dim mi As Object | |
Dim s As String | |
Set fi = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox) | |
If fi.Items.Count <> 0 Then | |
Set mi = fi.Items.Item(fi.Items.Count) | |
If mi.Subject = "" Then | |
mi.Subject = "<E-mail without subject by " & mi.SenderName & " on " & CStr(Now) & ">" | |
'mi.ConversationTopic | |
mi.Save | |
End If | |
End If | |
End Sub | |
Private Sub Application_NewMail() | |
CheckEmptySubject | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment