adding at once all the email addresses of the spammers in the list of unwanted /unsollicited mails
Better,
replace the Sendkeys line with :
Set Btn = Application.ActiveExplorer.CommandBars.FindControl (1, 9786)
Spectre a formulé la demande :
Well, I have found a solution which is not the most professionnal one, but it
works.
I use the Sendkeys function . Using a French release of outlook, the Senkeys
"letters" must be most probably changed.
Sub addSpamAdress() ' ajoute toutes les adresses des span à la liste
d'expéditeur indésirables
On Error Resume Next
Dim olItem As Mailitem
Dim objInbox As MAPIFolder
Dim oSelection
Dim arc As Outlook.MAPIFolder
Dim junkMailAddress As String
Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderJunk)
Set oSelection = objInbox.Items
For I = 1 To oSelection.Count
Set olItem = oSelection.Item(I)
If oSelection.Count 0 Then ' si il ya des mails
junkMailAddress = olItem.SenderEmailAddress
If junkMailAddress "" Then
' *******************************
SendKeys "%SSB" ' here the changes to do
' *******************************
End If
End If
Next
End Sub
Spectre a émis l'idée suivante :
Hi,
Even if spammers use often a new address for each spam they send, it is not
always the case.
Hence, I am looking for a function which could add on one click all the
email addresses of the spams beeing in the unsollicited email folder (a
translation from French for "courrier indésirable")! to the list of
unsollicited mail addresses.
I have tried to do it myself but I have been unable to find the name of
this list.
Thanks
|