Iniciar uma conversa

Como fazer para o Outlook mover mensagens apagadas para lixeira em conta IMAP?

No Outlook 2013, caso o mapeamento não seja automaticamente detectado corretamente, segue site contendo dicas que podem ajudar...

http://www.msoutlook.info/question/546

No Outlook 2010, veja o seguinte link: http://blogmines.com/blog/2011/09/09/change-deleted-items-folder-for-imap-account-in-outlook-2010/

No Outlook 2007, o recurso não está disponível nativamente, sendo necessário criar uma macro. Veja detalhes abaixo.

Crédito ao site: http://zoltanb.co.uk/index.php?/articles/outlook-send-to-trash-with-imap.php

O link acima está indisponível, reproduzimos o conteúdo abaixo:

If you set up outlook with an IMAP account, there's no way to tell outlook to send an email to trash on deletion.

Most email clients will happily do it, but outlook only has the default mark for deletion and purge options.

After hours and hours of struggling, I managed to do it in outlook what is normally one click in other mail clinets:

If you want to use an IMAP account and still use the trash for deleted items, you need to do the following:

  1. Create a macro that copies the email into the Trash folder, then deletes it - ie. marks it for deletion
  2. Create a Digital Certificate for your macro, so that it won't get disabled next time you start Outlook
  3. There is a view option in outlook that hides the 'marked for deletion' items, but it will hide the preview pane, so:
    Create a custom view,  enable the preview pane, create a new filter that only shows items that are not marked for deletion
  4. Create a Trash folder on your IMAP account (if you haven't got one already)
  5. in customise toolbar remove the delete button
  6. Create a new button (with a delete icon) that runs your macro
  7. The delete key will still work the old way, so put 4 razor blades around the delete key. It will help you learn not to use it.

Here's the vb script that finally worked (copy and pasted together from scripts I found on the internet):

Sub MoveToTrash()
On Error Resume Next
    Dim objFolder As Outlook.MAPIFolder
    Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem
 
    Set objNS = Application.GetNamespace("MAPI")
    Set objFolder = objNS.Folders("imapmail").Folders("Inbox").Folders("Trash")
 
    If objFolder Is Nothing Then
        MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
    End If
 
    If Application.ActiveExplorer.Selection.Count = 0 Then
        Exit Sub
    End If
 
    For Each objItem In Application.ActiveExplorer.Selection
        If objFolder.DefaultItemType = olMailItem Then
            If objItem.Class = olMail Then
                objItem.UnRead = False
                objItem.Move objFolder
                objItem.Delete
            End If
        End If
    Next
 
    Set objItem = Nothing
    Set objFolder = Nothing
    Set objNS = Nothing
End Sub
Escolher arquivos ou arraste e solte arquivos
Esse artigo foi útil?
Sim
Não
  1. Flávio Zarur Lucarelli

  2. Publicado
  3. Atualizado

Comentários