How can I delete a specific mail from an folder in Outlook?
Does anybody have an idea?
Printable View
How can I delete a specific mail from an folder in Outlook?
Does anybody have an idea?
This piece code will remove the first item in the users Inbox.
If you want to remove items of mail from other folders, you can reference the folder using the code I submitted earlier.Code:Set myOLApp = CreateObject("Outlook.Application")
Set myNameSpace = myOLApp.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItem = myInboxFolder.Items(0)
myItem.Delete
http://forums.vb-world.net/showthrea...threadid=41385
:)
Ishamel,
you are a big help. Thanks.