preprocessing attachments...

  • Thread starter Thread starter lucifer
  • Start date Start date
L

lucifer

i need to preprocess an incoming mail so tht ...if i c a particula
magic string in my subject line...the attached .wav file get playe
...how do i code for it...how do i make a plug in...?? can anyone pl
help..it's important and urgent..
 
See http://www.slipstick.com/dev/comaddins.htm for information about
COM addins and make sure to download and study the ItemsCB COM addin
sample (VB6) on the Resources page at www.microeye.com. It shows the
best practices for COM addins and workarounds for common bugs and
limitations in COM addins.

See http://www.slipstick.com/dev/code/zaphtml.htm#cw for an example of
an ItemAdd handler for the Items collection in the Inbox to see how to
handle new emails coming in.

You can play a .WAV file by calling the Win32 API. The code to do so
is:

Public Declare Function sndPlaySound Lib "WINMM.DLL" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As _
Long) As Long

Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10

Public Sub PlaySound()
Dim SoundName As String
Dim wFlags As Integer
Dim X As Integer

On Error Resume Next
SoundName = <path and file name here of .WAV file to be played>
'string
If SoundName <> "" Then
wFlags = SND_ASYNC Or SND_NODEFAULT
X = sndPlaySound(SoundName, wFlags)
End If
End Sub
 
Back
Top