One-click Outlook archiving?
May 17, 2006 4:48 PM   Subscribe

Outlook 2003: adding an "archive" button?

I don't delete email - instead, I archive everything. However, I want to start using GTD and move towards a zero inbox, which means that I need to immediately archive everything that's nonactionable (or actionable after I create the appropriate project/task for it). In Outlook, though, there's no easy, one-click way to archive... or is there?

Right now, I'm dragging the email to the "Inbox in Archive Folders" folder, but I'd really like a button to sit right next to (or replace) the "delete" button on the email pane, and/or have an "archive selected emails" button from the main inbox taskbar that would do this without the click, drag, aim, release cycle.

Does anyone know whether this functionality exists via plugin, or how hard it would be to create this functionality? Changing email clients is not an option.

Thanks.
posted by aberrant to Computers & Internet (12 answers total) 3 users marked this as a favorite
 
(Outlook 2000, YMMV)

This isn't exactly what you asked for, but I also operate with a "zero inbox"... but instead of a button, I select the message (or use Shift+Arrow Keys to select multiple messages) then press Ctrl+Shift+V to open the "Move To Folder..." dialog and select the appropriate folder with the arrow keys and press enter.

Outlook remembers the last folder you selected - which for me is usually my Archive folder - so often all I need to do is Ctrl+Shift+V, Enter. I like this better than a button because I don't need to move my hand to the mouse/touchpad.

If you really want a button, then I think you could make a macro, then open Tools -> Customize, click the Commands tab, find your macro in the macros section, then drag it up to the toolbar. (I haven't tried this myself so it might not work!).

Hope that helps...
posted by ajbw at 5:30 PM on May 17, 2006


Another way to do this is to use the "Organize" button.
You add the button to a toolbar in the normal Office way.

Once it's there, click it. Make sure it's set to "using folders". Select the message(s) to archive, then use the drop down to choose your archive folder. If it's not shown click "other folder" and select it from the list. It will appear there in the future.

The only downside? I haven't yet figured out how to make Outlook leave the Organize feature open all the time. Someday, I'll get there.
posted by disclaimer at 5:33 PM on May 17, 2006


Note: the normal office way is to click the "customize" option on any toolbar, then find the Organize command in the Commands list, then drag it to the toolbar where you want it.
posted by disclaimer at 5:35 PM on May 17, 2006


The macro idea seems best, but I have no idea how to use VB to do this... :(
posted by aberrant at 5:49 PM on May 17, 2006


This might help with the macros... you might have to modify it a bit to suit your needs - especially if you want to move it to a separate archive mailbox (e.g. for me it's a .pst file).

There are quite a few other results for this search that might help, too.
posted by ajbw at 6:55 PM on May 17, 2006


I've found one that works - unfortunately, it doesn't update the "inbox" view so that the moved message is still listed until I go to another folder and then back. Is there a VB command that will refresh the inbox view?
posted by aberrant at 7:06 PM on May 17, 2006


OK, I think I got it - if someone with VB-fu can confirm that this is OK, that'd be great:


Public Sub MoveToArchive()
Dim Inbox As MAPIFolder, Archive As MAPIFolder, Msg As MailItem

Set Inbox = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
Set Archive = Application.GetNamespace("MAPI").Folders("Archive Folders").Folders("Inbox")

For Each Msg In ActiveExplorer.Selection
Msg.Move Archive
Next Msg
Inbox.CurrentView.Reset
End Sub

posted by aberrant at 8:23 PM on May 17, 2006


David Allen offers a GTD plugin for Outlook which is something like what you're asking for, but it archives to multiple folders, depending on whether the email is something to defer, delegate, act on or save for reference. I believe it also creates tasks automatically as well.

You can try it free here.
posted by zanni at 9:19 PM on May 17, 2006


Slight mod: removed the "As Mailitem" from the Dim, since I want to be able to archive other types (Calendar Items, etc.) Seems to be working....
posted by aberrant at 9:28 PM on May 17, 2006


Removing the "as mailitem" isn't useful (or harmful) in this instance, because your inbox only has mail items in it, no?

If you can clarify what you mean by archiving other item types, I can mod your macro for you.

My guess is you mean: "Move everything in the current folder to the corresponding folder in my archive .pst file". True?
posted by SuperSquirrel at 7:47 AM on May 18, 2006


I actually have a button, just as you describe. The VB code I use is:

Sub MoveSelectedMessagesToFolder()
On Error Resume Next

Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem

Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objFolder = objInbox.Parent.Folders("mail archive")
'Assume this is a mail folder

If objFolder Is Nothing Then
MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
End If

If Application.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Sub
End If

For Each objItem In Application.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
If objItem.Class = olMail Then
objItem.Move objFolder
End If
End If
Next

Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub

I didn't write it, just pinched it from somewhere. It has worked without any issue for a few months. Looks very similar to your code.

I've set up a button and a Keyboard shortcut, and a mouse gesture(via Stroke it), whick I particularly like.
posted by Touchstone at 8:20 AM on May 18, 2006


SuperSquirrel: you can have outlook calendar acceptances in your inbox, for example, and they're not of type MailItem. That's why I untyped Msg.

Anyway, I got it working - I like the error checking in your code, Touchstone, so I may pilfer some of it. It was a good learning experience in any case - it was actually fairly easy to understand the code once I had some to look at, but I doubt I could just do it from scratch.
posted by aberrant at 9:39 PM on May 18, 2006


« Older Need Help Getting Apt. in L.A.   |   Ask the MythBusters! Newer »
This thread is closed to new comments.