Results 1 to 3 of 3

Thread: Delete mail in Outlook

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    Question

    How can I delete a specific mail from an folder in Outlook?
    Does anybody have an idea?
    Life is trip, eat it and smile.

  2. #2
    Lively Member Ishamel's Avatar
    Join Date
    Nov 1999
    Location
    Edinburgh, Scotland
    Posts
    112
    This piece code will remove the first item in the users Inbox.

    Code:
    Set myOLApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOLApp.GetNamespace("MAPI")
    Set myInboxFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
    Set myItem = myInboxFolder.Items(0)
    
    myItem.Delete
    If you want to remove items of mail from other folders, you can reference the folder using the code I submitted earlier.
    http://forums.vb-world.net/showthrea...threadid=41385


  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2000
    Location
    Vienna, Austria
    Posts
    62

    Wink :-)

    Ishamel,
    you are a big help. Thanks.
    Life is trip, eat it and smile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width