Macro to open a new Task and assign it a specific category

S

Steve Marshall

I would like to set up an Outlook macro or hot key that does the following in
any Outlook view:

1. Opens a new task

2. Assigns the task a specific category — for example, Business Resource,
which is the second listing in my category master list.

Why? When I have a Business Resource idea, I want to press a key, write the
note, and close the task – without having to manually choose the Resource
category.

I’ve got routine down to 8 keystrokes before I write: Shift-Ctrl-K, Alt-G,
down, down, plus sign, enter. But that’s 7 clicks too many.

I make dozens of notes a day and I use Outlook Tasks for this purpose
primarily because of its category function. If I can create a macro for the
Resource category, I’ll redo it for each of the 4 or 5 other categories I
typically use -- marketing, newsletter content, etc.

Want a real challenge

? What I really need is a hotkey that will perform this task from any
application, any time.

Thx
 
M

Michael Bauer [MVP - Outlook]

A VBA function for creating a new task is simple:

Dim Task as Outlook.TaskItem
Set Task=Application.CreateItem(olTaskItem)
Task.Categories ="whateveryouwant"
Task.Display

Calling that from system-wide hotkeys isn't. Here's a sample:
http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Registered_Hotkeys/article.asp

You could add an UserForm to your VBA project, but getting it's window
handle is some more work with Win32 APIs. Much easier would it be with VB6
instead of VBA.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Am Wed, 8 Nov 2006 15:24:01 -0800 schrieb Steve Marshall:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top