Friends, i want to share with you my latest MS Outlook improvements. If you are busy person and you receive a lot mail every day, so this feature also may help you. So how does it work? Once you receive a mail the Outlook inform you with voice about it and tell you the sender’s name.
This is improvement allow you switch your attention to the mail if it really important for you at the moment.
So, find bellow the realization of mention above idea:
1) Open MS Outlook
2) Go to Visual Basic for Application (press Alt+F11 to open it)
3) Activate “Microsoft Speech Object Library” library
Tools –> References…
4) Go to “ThisOutlookSession” tree and view code
5) Copy Visual Basic code below to the application
Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Dim olApp As Outlook.Application Dim objNS As Outlook.NameSpace Set olApp = Outlook.Application Set objNS = olApp.GetNamespace("MAPI") ' default local Inbox Set Items = objNS.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub Items_ItemAdd(ByVal item As Object) Dim speechobject, sSender, sName, sSurname, sSplitName, sSplitSurname On Error GoTo ErrorHandler 'Dim Msg As Outlook.MailItem If TypeName(item) = "MailItem" Then ' ****************** 'Set Msg = item sSender = item.SenderName sSplitSurname = InStr(1, sSender, " ") sSplitName = InStr(sSplitSurname + 1, sSender, " ") sName = Mid(sSender, sSplitSurname + 1, sSplitName - sSplitSurname - 1) sSurname = Mid(sSender, 1, sSplitSurname - 1) Set speechobject = CreateObject("sapi.spvoice") speechobject.Speak "Incoming email from" & sName & " " & sSurname ' ****************** End If ProgramExit: Exit Sub ErrorHandler: MsgBox Err.Number & " - " & Err.Description Resume ProgramExit End Sub
6) Save changes
7) Restart MS Outlook