ticker tape


J

JP Ronse

Hi All,

Being responsible for a team that provides real time monitoring services 24
hours on 24, 7 days on 7 (XMas, New Year included) and mail is our way to
have a written confirmation of notifications, we are using a shared mailbox.
This is working fine but the problem is that this mailbox receives some 100
mails per day. Mails we are in CC, but also in To.

On some of these mails, we have to react within 15 minutes, which is really
short. Therefore I was thinking to capture incoming mails and check them
against certain criteria. When the criteria is met, I would like to display
a kind of ticker tape message.

I have little experience with Outlook programming.

A form with textbox is an option but I prefer an API window-textbox that can
be closed with <escape>.

Any idea how I could get this working. Your help will be very much
appreciated.

Wkr,

JP
 
Ad

Advertisements

K

Ken Slovak - [MVP - Outlook]

If you want an API window that really has nothing to do with Outlook
programming. How you'd do that depends on lots of things like the version of
Windows, the language you plan to use and what version of Visual Studio you
plan to use. For any Outlook coding some of what you could do would depend
on the version of Outlook you plan to support. There's really not enough
information to provide any answers, where they'd even be relevant to Outlook
programming at all.
 
Ad

Advertisements

J

JP Ronse

Hi Ken,

Tnx for your reply.

I have already some code in Outlook/ThisOutlookSession which plays a sound
when mails from a specific sender are received. It is working fine but we
reached a bit the human limits in remembering sounds and the link to the
sender. A second disadvantage is that I cannot make it too long and too loud
because people are on the phone. So I'm looking for a more professional
notification instead of a sound.

It should be possible with a form/textbox or an API window.

Wkr,

JP

Code hereafter.


Option Explicit

Public WithEvents myOLMails As Outlook.Items


Dim mappOL As ThisOutlookSession
Dim mobjMail As Outlook.MailItem



'''*********************************************************************************
'''*********************************************************************************
''' used for playing a sound
'''---------------------------------------------------------------------------------
Private Declare Function GetWindowsDirectoryA Lib "Kernel32" _
(ByVal lpBuffer As String, ByVal nSize As Long) As Long

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA"
_
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
'''*********************************************************************************

Private Sub Application_Startup()
'''On Error Resume Next

Set myOLMails = Outlook.Session.GetDefaultFolder(olFolderInbox).Items

''' run code only when working online
If ThisOutlookSession.Session.Offline Then GoTo Exit_Application_Startup


Exit_Application_Startup:
On Error GoTo 0
End Sub

Private Sub myOLMails_ItemAdd(ByVal Item As Object)
''' declarations of variables
Dim MyItem As MailItem
Dim lngSound As Long
Dim strBuf As String
Dim lngSize As Long
Dim strWinDir As String

''' trap run-time errors
On Error GoTo Exit_myOLMails_ItemAdd

''' run code only when item is a mailitem
If TypeName(Item) <> "MailItem" Then GoTo Exit_myOLMails_ItemAdd
''' exit routine if mail is coming from ...

Set MyItem = Item
strBuf = String(255, 0)
lngSize = 255
lngSound = GetWindowsDirectoryA(strBuf, lngSize)
strWinDir = Left(strBuf, lngSound)

'''lngSound = sndPlaySound("D:\Data\newfax1.WAV", 0)
'''lngSound = sndPlaySound("D:\Data\VRT.WAV", 0)


If MyItem.SenderName = "xyz" Then
lngSound = sndPlaySound(strWinDir + "\Media\xyz.WAV", 0)

End If

Exit_myOLMails_ItemAdd:
''' disable error trapping
On Error GoTo 0
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top