« GTD “!Daily Disciplines” Category | Main | Why I Bought a TabletPC »

Sunday, June 13, 2004

Automating Your !Daily Disciplines Task List in Outlook

Yesterday, I wrote about how I use a !Daily Disciplines task category in Outlook. I use this category to group those basic tasks that I want to accomplish each morning before leaving for the office. Today, I want to tell you how to automate this list in Outlook, using a little VBA code. This will enable you to enter the list with a single mouse click.

First, make sure that you have Outlook loaded. If you are new to VBA programming or “macros,” as they are sometimes called, start by selecting Tools | Macro | Macros … or just press Alt-F8. Either way, you’ll get a dialog box that looks like this:

MacroDailyDisciplines

Type in the phrase “DailyDisciplines” (without the quotes). This will open up the VBA editor with the cursor positioned between the Sub and End Sub statements like this:

DDSubEndSub

Delete everything from the word Sub on the first line to the word Sub on the last line.

Now click here to open a  new browser window with the code. Select all of the text (using Ctrl-A), copy it to the Windows clipboard (Ctrl-C), and then go back to the VBA Editor. Now paste the code you copied to the clipboard into the editor window (Ctrl-V).

Your should now be looking at the code in the VBA editor. I have highlighted each of the tasks in yellow. (You can click on the graphic to enlarge it.) Change these to tasks that are meaningful to you. If you have more tasks than I do, just copy one of the code blocks and paste it into the code. If you have fewer tasks, just delete the code block or comment it out by preceding the line with an apostrophe (actually, the foot mark: ').

DDHighlightedCode

Okay, you're almost done. Now close the VBA code window by pressing Alt-F4. Make sure you are now looking at Outlook. To run the basic macro, press Alt-F8, select the DailyDisciplines macro and press Enter. All of your Daily Discipline tasks should be instantly entered into Outlook. If you have your tasks grouped by categories, you should have a task pad that looks like this:

daily_disciplines

If you want to really get fancy, you can assign this to an icon on the toolbar. My icon, for example, looks like this:

DDIconButton

It took me about 10 minutes to create using the built-in icon editor that ships with Outlook. To get there, right-click on the Toolbar and select Customize. You will get a dialog box that looks like this:

DDCustomize

Now follow these steps:

  1. Select the word Macros in the Categories list box. All your macros will then appear in the Commands list box.
  2. Select the DailyDisciplines. (Note: It may be preceded by “Project1,” or some other project name, depending on how many other macros you have and how they are organized.)
  3. With the left mouse button still depressed, drag the macro onto the tool bar where you want it.
  4. Now right-click on the macro name on the tool bar.
  5. If you don’t want to create an icon, just give the button a new name. If you want to create an icon, select Edit Button Image…

Now whenever you click on the button, the program will launch the additional windows.

This kind of automated list building has all kinds of possibilities. Perhaps you have already thought of some. In an upcoming post, I’ll show you how to use this basic methodology to build your weekly review list.

June 13, 2004 at 03:48 AM in Getting Things Done, Microsoft Outlook | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83452682569e200e5505dd4968833

Listed below are links to weblogs that reference Automating Your !Daily Disciplines Task List in Outlook:

» GTD Daily Disciplines VBA Re-Write from Joshwa's Racing Form
A rewrite of Michael Hyatt's code to be compatible with the GTD plugin, and add reminder capability [Read More]

Tracked on Jun 27, 2004 12:18:00 AM

» GTD Daily Disciplines VBA Re-Write from Joshwa's Racing Form
A rewrite of Michael Hyatt's code to be compatible with the GTD plugin, and add reminder capability [Read More]

Tracked on Jun 27, 2004 12:18:55 AM

» The More You Automate The Less You Have To Think About from Coaching Creative Thinkers
So I'm catching up on all of emails and to-do's and thinking "Will it ever end!" The answer seems to be "No." There are certain things I have to do every day for the rest of my life. Just thinking about how to add this to my schedule gave me a headache... [Read More]

Tracked on Aug 7, 2006 4:29:33 PM

Comments

Great idea! I think alot of people will be helped by what you've written in this article. Thanks for the great idea!

Posted by: Michael Mahony | Jun 14, 2004 11:27:34 PM

Michael,

I really like your approach to automating this type of entry. The one change that I have made, is to automatically insert a due date, which is todays date. The code for this is:

oMyTaskItem.DueDate = Date

I like to do this, as sometimes I am not as disciplined in my "Daily Disciplines" as I would like to be. Evaluating how I am doing in these areas becomes a part of my weekly review.

Thanks for sharing these great tips.

Dave

Posted by: David Sugg | Jun 21, 2004 2:12:21 PM

I am stumped on a project that I can find no help for.
I recieve several emails weekly from specific people that thru the "Rules" funtion I can sort & catagorize.
I want to go one step further.

Example :

If i get an email titled "1.zip" from john I would to move it to the folder [ inbox / john / zip ] & then open it with Powerdesk Explorer wich will let me see the 1.xls in the zipped file.
Then I would like to open the 1.xls file with excel & run a specific macro in excel.
I can & do this all manually right now, about 25 times a week.
What I can not do [or find info on how to get done] is to get Outlook to start the process.

Can you help?

Posted by: selkov | Nov 19, 2004 10:26:06 AM

I tweaked your code to set a due date and a reminder for each item:

oMyTaskItem.ReminderSet = True
oMyTaskItem.ReminderTime = DateAdd("d", 2, Now)
oMyTaskItem.DueDate = DateAdd("d", 2, Now)
oMyTaskItem.ReminderPlaySound = True

Posted by: John | Jan 6, 2005 7:52:28 AM

Here is another variation on the code that reduces the length by a factor of how many tasks you have, in the above case it is about 1/7th as long. To add additional tasks modify the array: Tasks = Array("Read the Bible", "Pray", "Review Scripture Memory Verses", "Read 'A Bias for Action'", "Review Life Plan", "Plan Day", "Work out")

Here is the new code:

Sub DailyDisciplines()

'=================================================================
' Procedure : DailyDisciplines
' Author : Michael S. Hyatt, Modified by Neil McConnell (neil@m5group.com)
' Date : 1/5/2004 05:46
' Purpose : Creates several daily disciplines tasks.
' Shortcut : None
' Modified : 6/12/2004 05:46
'=================================================================

' Declare the variables:
Dim oMyTaskItem As TaskItem

On Error GoTo DailyDisciplines_Error

Tasks = Array("Read the Bible", "Pray", "Review Scripture Memory Verses", _
"Read 'A Bias for Action'", "Review Life Plan", "Plan Day", "Work out")

For T = 0 To UBound(Tasks)

Set oMyTaskItem = Application.CreateItem(olTaskItem)
oMyTaskItem.Subject = T + 1 & ". " & Tasks(T)
oMyTaskItem.Categories = "!Daily Disciplines"
oMyTaskItem.Importance = 1

oMyTaskItem.ReminderSet = False
oMyTaskItem.ReminderTime = DateAdd("d", 0, Now)
oMyTaskItem.DueDate = DateAdd("d", 1, Now) ' or just Date
oMyTaskItem.ReminderPlaySound = True

oMyTaskItem.Save

Next T

Set oMyTaskItem = Nothing

On Error GoTo 0
Exit Sub

DailyDisciplines_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure DailyDisciplines of Module Utilities"

End Sub

Posted by: Neil McConnell | Jan 29, 2005 6:21:13 PM

Could you help me with getting the WYWO application to work and automating the Weekly Review and the Daily Disciplines list. When I first ran the WYWO program it worked, but then after I tried to do the Weekly Review and the Daily Disciplines automation, it did not work.

Thanks!!

Posted by: Crystal | Nov 23, 2005 10:05:16 PM

I have been asked to find a way to use either a key combination or function key to copy a task in outlook. I know the combination of ctrl-c, ctrl-v will acccomplish what I need, but can this be done with one keystroke rather than 2?
Any help would be greatly appreciated.

Thanks,
Allen

Posted by: Allen Patterson | May 5, 2006 8:39:35 AM

Post a comment