Solved

Move E-Mail to IMAP Trash Folder in Outlook 2003, when message is "Deleted"

Posted on 2006-07-06
7
11,180 Views
Last Modified: 2009-02-28
Question Title pretty much sums up the problem, but I will tell you the entire problem.

I have customers who use Outlook 2003 as their Mail Client, and they connect to our IMAP servers.  Every other functionality they love, but when they delete messages, they want them to go to their trash folder, rather then the regular "Strike Through, then Purge" method.  The only reason he wants this functionality is so that he can go back and look through his trash when he did not mean to delete something, or when something else happens.

I have already told him that a strike through is basically the same thing, and purging it is the actual deleation step.  I have already told him that he can just "Drag and Drop" items over into the trash, and that will work, but he is stubborn, and really wants things to work the exact same as they did with his account when he uses POP3 on our servers.

Question Summery:
Does anyone know of a way to highlight a message, hit delete, and the message get moved into the Trash folder rather then the Strike and Purge?
0
Comment
Question by:jetnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 97

Accepted Solution

by:
war1 earned 250 total points
ID: 17055231
Greetings, jetnet !

There is nothing natively in Outlook that will allow you to delete IMAP email to Trash. You can use a VBA Macro to move deleted email to Trash
http://www.segebrecht.com/axel/computing/windows/deleting-imap-messages-in-microsoft-outlook

Best wishes!
0
 
LVL 2

Author Comment

by:jetnet
ID: 17059844
I found this bit of code on there, and from the authors explanation, it looks like what I am looking for.  But how do I make this work now?
**********************
Sub DeleteMessages()

Set myOlApp = CreateObject("Outlook.Application")

Dim myNameSpace As NameSpace

Set myNameSpace = myOlApp.GetNamespace("MAPI")

Dim myExplorer As Explorer

Set myExplorer = myOlApp.ActiveExplorer

'Get the folder type, expected type is 0 i.e. mail folder. If other type of
folder
'being used then abort macro as it should only be used with mail folders.
folderType = myExplorer.CurrentFolder.DefaultItemType

'Check that folder is mail folder
If TypeName(myExplorer) = "Nothing" Or folderType <> 0 Then
GoTo invalidMailbox
End If

'Locate root folder for this account
Set thisFolder = myExplorer.CurrentFolder
Do Until thisFolder.Parent = myNameSpace
    Set thisFolder = thisFolder.Parent
Loop
Set accountFolder = thisFolder

'Identify selected messages
Dim selectedItems As Selection
Set selectedItems = myExplorer.Selection
Dim currentMailItem As MailItem
Dim iterator As Long

'Run loop on selected messages
For iterator = 1 To selectedItems.Count
Set currentMailItem = selectedItems.Item(iterator)

'Move messages to Deleted Items folder
Set trashFolder = accountFolder.Folders("Trash")
currentMailItem.Move (trashFolder)

Next

'Now, purge deleted messages
Dim myBar As CommandBar
Set myBar = Application.ActiveExplorer.CommandBars("Menu Bar")
Dim myButtonPopup As CommandBarPopup
Set myButtonPopup = myBar.Controls("Edit")
Dim myButton As CommandBarButton
Set myButton = myButtonPopup.Controls("Purge Deleted Messages")
myButton.Execute

Exit Sub

invalidMailbox:
MsgBox ("Macro configured only to work with mail folders! ")

Exit Sub

End Sub
**********************

Where am I suppose to put this, or do with it or.... anything?  Any help would be great, as I am no Outlook expert.
0
 
LVL 2

Author Comment

by:jetnet
ID: 17442805
I still need a solution for what I need to do with this information?  Anyone want to helo me?
0
 
LVL 97

Expert Comment

by:war1
ID: 17442946
jetnet, I am not familiar with the code or how to make it work for you situation. You may want to ask a new question. Best wishes!
0
 
LVL 97

Expert Comment

by:war1
ID: 17619792
Thanks Venabili and DarthMod !
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question