A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 8th 06, 11:24 PM posted to microsoft.public.outlook.program_vba
Steve Marshall
external usenet poster
 
Posts: 1
Default Macro to open a new Task and assign it a specific category

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
Ads
  #2  
Old November 9th 06, 06:01 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Macro to open a new Task and assign it a specific category


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...ys/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:

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Way to assign a default category? StargateFanFromWork Outlook - General Queries 2 August 18th 06 03:26 PM
How can I assign a category for a new contact Outlook 2007 Outlook - General Queries 1 July 27th 06 04:54 PM
SELECT NUMEROUS CONTACTS. ASSIGN TO A NEW CATEGORY AT ONCE? Ozzy's Mom Outlook - Using Contacts 1 July 13th 06 01:56 AM
Assign Task problem-Can't accept or assign DOL Outlook - Calandaring 5 June 29th 06 06:57 AM
Simple assign category button caero Outlook and VBA 15 March 14th 06 03:35 PM


All times are GMT +1. The time now is 02:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.