• Moving to Outlook 2003 – Deleted IMAP messages

    Home » Forums » AskWoody support » Productivity software by function » MS Outlook and email programs » Moving to Outlook 2003 – Deleted IMAP messages

    Author
    Topic
    #473996

    I’ve been using Thunderbird for years, and am pretty familiar with it.

    I have never been much of an Outlook user.

    However, work is going to force everyone to start using Outlook soon; apparently, Outlook 2003.

    Users are set up to use IMAP.

    One thing I want to happen is that when I delete an email, it goes to the local “Deleted Items” folder. Currently, when I press DELETE, I get a grey line through the email. When I do the “Purge”, the messages disappear, but aren’t in the “Deleted Items” folder.

    Do I want to set up a rule to move everything from the IMAP “Inbox” to a local “Inbox”? Will that help?

    I generally keep all of my email — I used the Deleted Items as a way to look back for “when did we do XYZ?” questions, so it works to keep all of the old email. I could just as easily move it to an “Archive” folder, I suppose.

    Anyway, are there any tips are hints or help for getting deletions to work like I expect them to work?

    I’m sure I’ll grow to like Outlook after I get used to it, but for now, the process seems painful.

    Thank you, fellow Loungers!

    Viewing 1 reply thread
    Author
    Replies
    • #1261979

      Users are set up to use IMAP.

      One thing I want to happen is that when I delete an email, it goes to the local “Deleted Items” folder. Currently, when I press DELETE, I get a grey line through the email. When I do the “Purge”, the messages disappear, but aren’t in the “Deleted Items” folder.

      I thought was happened when you delete from the Inbox of an IMAP account was that the message goes to the Trash folder in the IMAP account. Maybe this depends on the service… Can you find them on the server?

      I could just as easily move it to an “Archive” folder, I suppose.

      That might be easier than changing the default behavior! Outlook is not very good at letting you edit keyboard settings or create your own keyboard shortcuts. One way is to write a macro, then place it on the menu bar or a toolbar and assign it a character that is not used in the interface, such as X as its accelerator key. Then you can press Alt+X to run the macro. And the macro would move the message to the folder. I’ve done this in my Exchange mailbox to can spam, but haven’t tested to see whether it would work in an IMAP account. I’ll see if I can find time to play with that.

      I’m sure I’ll grow to like Outlook after I get used to it, but for now, the process seems painful.

      The pain may continue for some time…

    • #1261993

      Here’s a sample procedure. Let’s say you have a top-level folder in your IMAP account named Archived. (I created this folder for testing. If you have a different folder, you’ll need to edit the fifth line.) This code will move the messages selected in the Inbox to that folder. They don’t really move, of course, they are copied and the original messages is marked for purging. But it’s pretty close.

      IMPORTANT: this code is rough early code and not fault tolerant. Note that if you have a / anywhere in the name of your top-level IMAP account or Inbox, then it will not work correctly. Also, it can only handle a move-to folder at the top level (same level as Inbox). If you want to use a folder at a lower level (e.g., subfolder of Inbox) it will need some revision.

      Code:
      Sub ArchiveIMAPMessages()
      ' Meant to run on messages selected in the Inbox (not from within an open message)
      ' BETA v0.1 2011-01-06 jscher2000
      ' Destination folder name under IMAP top level folder (Trash didn't seem to work?!)
      Const strMoveTo As String = "Archived"
      ' Check selection
      Dim selCurrent As Outlook.Selection
      With ActiveExplorer
          If .Selection.Count = 0 Then Exit Sub
          If .Selection(1).Class  olMail Then
              MsgBox "Only moves mail messages", vbExclamation + vbOKOnly
              Exit Sub
          End If
          Set selCurrent = .Selection
      End With
      ' Verify destination
      Dim strActiveFolder As String, strIMAPFolder As String, fldMoveTo As Outlook.MAPIFolder
      strActiveFolder = selCurrent(1).Parent.FullFolderPath   'begins \
      strIMAPFolder = Mid(strActiveFolder, 3, InStr(3, strActiveFolder, "") - 3)
      Set fldMoveTo = Application.GetNamespace("MAPI").Folders(strIMAPFolder).Folders(strMoveTo)
      ' Move the messages
      Dim intCounter As Integer
      For intCounter = selCurrent.Count To 1 Step -1
          selCurrent(intCounter).Move fldMoveTo
      Next
      ' Note: moved messages are marked for deletion; purging omitted for safety!
      If Not (fldMoveTo Is Nothing) Then Set fldMoveTo = Nothing
      If Not (selCurrent Is Nothing) Then Set selCurrent = Nothing
      End Sub

      There is a lot to know about macros (VBA procedures) if you haven’t worked with them before in Office. But if you are familiar with Word and Excel macros, then the major difference in Outlook is that they all are stored in a single file (VbaProject.OTM) rather than in potentially multiple templates.

      If you’re motivated to experiment, give it a try.

      • #1262002

        There is a lot to know about macros (VBA procedures) if you haven’t worked with them before in Office. But if you are familiar with Word and Excel macros, then the major difference in Outlook is that they all are stored in a single file (VbaProject.OTM) rather than in potentially multiple templates.

        If you’re motivated to experiment, give it a try.

        Thanks; I am pretty familiar with Word & Excel macros, but I was hoping that Outlook had a “record” like Word or Excel does – I usually get a rough idea from it doing the recording, and then I refine what I do. But it’s been a while.

        Anyway, many thanks for the help.

        I did send myself a test message and hit DELETE, but it vanished and I couldn’t find it… I then did a PURGE, hoping it would move to Deleted Items, but it didn’t. I may use your macro to make things go better.

        Sigh… “Microsoft: making people happier about Linux with every product”

    Viewing 1 reply thread
    Reply To: Moving to Outlook 2003 – Deleted IMAP messages

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: