Blog Archives

Use an Outlook Macro to Stop Forgetting the Subject Line [Outlook]

Windows only: Microsoft Outlook is a powerful tool used worldwide by corporate drones—and with a little macro goodness, it will remind you to attach a subject line to your TPS Reports.

Adding the new macro requires a number of steps, but when you are finished you'll have a reminder to add in a subject line—just like Gmail has by default. You'll need to open up the Visual Basic macro editor, find ThisOutlookSession over in the left-hand treeview, and then paste in the macro into the editor.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
   Dim strSubject As String
   strSubject = Item.Subject
   If Len(Trim(strSubject)) = 0 Then
       Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
      If MsgBox(Prompt$, vbYesNo + vbQuestion + _
vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
        Cancel = True
      End If
  End If
End Sub

Once you've saved and closed the macro editor, you should receive a warning anytime you forget the subject line—a very useful trick to avoid sending an unfinished email.

Hit the link for the detailed walk-through screenshot tour. Note: this macro was found on at least half a dozen web sites, so we’re not really sure who the original author is, but the CodeProject link explains the process in the most user-friendly way. For more, check out how to defer sending emails to avoid embarrassment, or take a look through our top 10 Outlook boosters.





Use Macros to Control Your Computer with Your Voice [Speech Recognition]

Windows Vista only: The Vista for Beginners weblog walks through the process of setting up and using speech recognition macros that save you time by automating keystrokes with a voice command.

Their guide covers creating macros that can do anything from launching applications, sending batches of keystrokes, inserting blocks of text, or even creating aliases for some of the default commands that might be difficult to remember—a very useful read for anybody interested in making their computer do what they say.

For another take on the same topic, check out our must-read guide to controlling your PC with your voice, or if you’ve switched away from Windows you can make your Mac’s speech recognition work for you.





Add a Gmail-Like Archive Button to Microsoft Outlook [Ubergeek]

Gmail has popularized archive as an easy way to keep your inbox clean without trashing email, but if you're using Outlook, archive isn't really an option—by default, at least. Here's how to add archive to Outlook.

Whether you follow Inbox Zero or use Gina’s Trusted Trio to keep your inbox clean, one of the most time-consuming and annoying tasks in Outlook is moving your mail to an archive folder—and today we'll show you how to automate it using Outlook's powerful macro support.

All credit for this solution goes to Lifehacker reader jayp, who sent in his own ubergeeky technique that was the basis for this article—well worth a read if you want to see a more advanced version of the script .

For our scenario, we're trying to create a button that moves email messages from the Inbox into an Archive folder like this one—the magic happens behind the scenes with a macro that we'll create.

In order to use macros without being prompted every single time to accept them, you need to create a personal digital certificate using the aptly named Digital Certificate for VBA Projects utility.

Creating a digital certificate couldn't be easier—just type in a name and click the button, closing it out when you are done.

Next we'll create the macro by selecting Tools -> Macro -> Macros from the menu, type in a name for your macro and click the Create button.

Once you’ve launched the Visual Basic editor, you’ll need to paste in the following macro, replacing whatever is currently there. You’ll notice the Folders("Archive") section in the code—this can be modified if you want to use a folder name other than Archive.


Sub Archive()
Set ArchiveFolder = Application.GetNamespace("MAPI"). _
GetDefaultFolder(olFolderInbox).Parent.Folders("Archive")
For Each Msg In ActiveExplorer.Selection
Msg.Move ArchiveFolder
Next Msg
End Sub

Once you've completed that step, go to Tools -> Digital Signature and assign the certificate that you created earlier. This is what will allow Outlook to run our macro without constant warnings. Once you are finished, click the save button and use the File -> Close and Return menu item to return to Outlook.

Next we get to actually add the button to the toolbar—just right-click over the toolbars, choose Customize, and then browse down to Commands -> Macros and drag your macro onto the toolbar.

While you still have the Customize dialog open, you can rename the button or even eliminate the text, and assign a new icon. If you want to create a shortcut key for the button, you can put an ampersand (&) character before any of the letters, which will make the shortcut accessible through the Alt+<key> shortcut key combination.

Now we've got an icon to archive mail—but you'll need to restart Outlook to complete the setup.

After Outlook starts back up, you'll see a security notice dialog asking whether to enable or disable macros—you want to choose "Trust all documents from this publisher" so you won't be prompted again.

At this point you should have a fully working solution for quickly archiving messages, but the same techniques could be used to create more advanced functionality—like a full-blown GTD system—it's just a matter of rolling up your geek sleeves and getting to work.

This solution is what works for me, using Outlook 2007 hooked to Exchange. If you’re having problems, let’s try to figure it out in the comments. Good luck!

If email automation is up your alley, be sure and check our guides to emptying your inbox with the Trusted Trio or separating your email from your to-do’s.





WP Like Button Plugin by Free WordPress Templates