Solved

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

Posted on 2006-07-06
7
11,158 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Outlook 2016 Mac and Google Calendar - performance problem 4 64
Exchange 2007 6 41
exchange, squid, proxy, linux 6 83
Using Outlook 2016 with ACT 2012 Pro 2 67
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
If you don't know how to downgrade, my instructions below should be helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

739 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