1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Private Sub Application_ItemSend(ByVal item As Object, Cancel As Boolean)
'by oliv modifiée le 20/02/2013
Dim prompt As String
Dim taille, pieces
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
' on verifie que c'est un mail
If Not item.Class = olMail Then GoTo fin
'###########verification SI PUBLIPOSTAGE #################################
If UCase(item.subject) Like "*PUBLIPOSTAGE*" Then
On Error Resume Next
'ici ton code
'On supprime le terme PUBLIPOSTAGE du sujet
item.subject = Replace(item.subject, _
"PUBLIPOSTAGE", "")
'On sauvegarde le mail
item.Save
'on va directement à la fin pour éviter les questions sur l'envoi
GoTo fin
End If
fin:
End sub |
Partager