Computing.Net > Forums > Programming > Outlook macro, Search and delete sp

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Outlook macro, Search and delete sp

Reply to Message Icon

Name: Juzzz
Date: January 15, 2008 at 03:00:38 Pacific
OS: WinXP
CPU/Ram: 1 GB
Comment:

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 Integer

Set 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 If

End Sub

i hope SOME ONE can help me.

ty



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: January 15, 2008 at 04:24:19 Pacific
Reply:

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


0

Response Number 2
Name: Juzzz
Date: January 16, 2008 at 07:40:16 Pacific
Reply:

i aklsed him but i knows nothing about oultook macro's :(


0
Reply to Message Icon

Related Posts

See More


Windows forms and MySQL How can I create a simple...



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Outlook macro, Search and delete sp

Batch File search and delete file www.computing.net/answers/programming/batch-file-search-and-delete-file/16386.html

Custom Outlook Macro www.computing.net/answers/programming/custom-outlook-macro/3704.html

Outlook Macro: Moving Messages www.computing.net/answers/programming/outlook-macro-moving-messages/13880.html