• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11356
  • Last Modified:

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

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
jetnet
Asked:
jetnet
  • 3
  • 2
1 Solution
 
war1Commented:
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
 
jetnetAuthor Commented:
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
 
jetnetAuthor Commented:
I still need a solution for what I need to do with this information?  Anyone want to helo me?
0
 
war1Commented:
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
 
war1Commented:
Thanks Venabili and DarthMod !
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now