Are you a fan of the Google Gmail Archive button that moves your current message to the Archive so you never have to look for it again. Then this blog is for you. I walk you through how to create this functionality in Outlook 2003.
Create a macro in Outlook.
Sub ArchiveIt()
On Error Resume Next
Dim objFolder As Outlook.MAPIFolder ' Folder where we want to move select of messages
Dim objInbox As Outlook.MAPIFolder ' Archive Inbox
Dim objNS As Outlook.NameSpace
Dim objItem As Outlook.MailItem
Set objNS = Application.GetNamespace("MAPI")
'Find Domino Mailbox
Set objInbox = objNS.Folders("Archive Folders")
'Find Archive Inbox
Set objFolder = objInbox.Folders("Inbox")
'Assume this is a mail folder
If objFolder Is Nothing Then
MsgBox "This destination folder (called Inbox) 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.UnRead = False
objItem.Move objFolder
End If
End If
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub
Create a digital signature so it can be run again using the button or key stroke.
Run C:\Program Files\Microsoft Office\OFFICE11\SelfCert.exe
Use the digital signature to sign your macro:
Open the macro in the macro editor.
Then go to Tools menu and click the Digital Signature menu item.
Choose the certificate (if it is not already chosen).
Create a tool bar and toolbar button. Assign a key stroke to it if you like. That is it.