Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi there,
i want to search the public spam folder and delete messages whit a subject thats equal to ......
my code till now:
Public Sub Spam_uitzoeker()
Dim ns As NameSpace
Dim Item As Object
Dim Atmt As Attachment
Dim i As IntegerSet ns = GetNamespace("MAPI")
Set Spambox = ns.GetDefaultFolder(olPublicFoldersAllPublicFolders).Folders("Spam")If Spambox.Items.Count = 0 Then
MsgBox "the folder is empty YEAH!", vbInformation, _
"No spam found"
End If
If Inbox.Items.Count > 0 Then
If Item.Subject = "sex" Then
++I dont know how to sellect the searched items and delete it++
End If
End IfEnd Sub
i hope SOME ONE can help me.
ty

I don't have Outlook, so your best bet would be to ask DerbyDad03, who hangs out on the Office forum.

![]() |
Windows forms and MySQL
|
How can I create a simple...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |