Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Private WithEvents myOlApp As Outlook.Application
Private WithEvents inboxItems As Outlook.Items
'------------------------------------------------------------
Private Sub inboxItems_ItemAdd(ByVal Item As Object)
On Error GoTo ErrorHandler
If TypeName(Item) = "MailItem" Then
If Item.SenderEmailAddress = "iemand@ongewenst.com" Then
Item.Delete
RemoveItem
End If
End If
ExitNewItem:
Exit Sub
ErrorHandler:
MsgBox Err.Number & " - " & Err.Description
Resume ExitNewItem
End Sub
'------------------------------------------------------------
Sub RemoveItem()
'Graham Mayor - http://www.gmayor.com - Last updated - 01 Jan 2018
'Modified by edmoor - 30 Jan 2025
Dim olItem As Object
Dim lngDel As Long
Dim objDeletedFolder As Folder
Set objDeletedFolder = Session.GetDefaultFolder(olFolderDeletedItems)
On Error Resume Next
Set olItem = ActiveExplorer.Selection.Item(1)
olItem.Delete
For lngDel = objDeletedFolder.Items.Count To 1 Step -1
With objDeletedFolder.Items(lngDel)
'If .Subject = strSubject And .CreationTime = strDate Then
objDeletedFolder.Items(lngDel).Delete
Exit For
'End If
End With
Next lngDel
lbl_Exit:
Set objDeletedFolder = Nothing
Set olItem = Nothing
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.