Solved

Clear Categories on When Assigning Task or Rule that does the same

Posted on 2014-02-12
9
343 Views
Last Modified: 2014-03-07
In Outook 2010 I have several tasks which have been assigned a category named "Docket Sheets *".  I have an Outlook View that filters on this category.

Sometimes I assign many of these tasks to someone else.  I need to be able to have this category removed from the task for the recipient when I assign the task or I need to be able to write a rule in the recipients mailbox that will clear the category when they receive it.

The "Clear categories on mail (recommended)" rule does not work.
0
Comment
Question by:Senniger1
  • 4
  • 3
9 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 39855845
Hi, Senniger1.

This cannot be done with a rule.  Rules only work against messages and meeting requests/updates.  They do not work against task requests.  I can remove the category, but doing that requires using a macro.  If a macro is acceptable, then let me know and I'll post the code and instructions for using it.
0
 

Author Comment

by:Senniger1
ID: 39856146
I'm open to a macro so yes, please post.

Thank you!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 39856177
Here's the code.  Follow these instructions to add it to Outlook.

1.  Start Outlook
2.  Press ALT+F11 to open the Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click File and select Options
9.  Click Trust Center
10. Click the Trust Center Settings button
11. Click Macro Settings
12. Change the Macro Settings to "Notifications for all macros"
13. Click OK
14. Click OK
15. Close Outlook
16. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olkTsk As Outlook.TaskItem
    If Item.Class = olTaskRequest Then
        Set olkTsk = Item.GetAssociatedTask(False)
        olkTsk.Categories = ""
        olkTsk.Save
    End If
End Sub

Open in new window


When you assign a task to someone, Outlook creates and sends the recipient a task request.  The code works by watching for these outgoing task requests.  When it sees one, it gets the task associated with that task request and removes its categories.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Senniger1
ID: 39859150
First of all, thank you so much for the detail and I totally liked the concept you proposed.

I followed your instructions.  When I assign a task, it is removing the category from MY tasklist and the recipient I've assigned the task to is still getting a task with a category.

I want the task in my tasklist to keep the category.  However, when I assign a task that has one of my categories, I don't want the recipient of the task to get a task with a category.

If I'm not explaining well, please let me know.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 39881321
Senniger1

Sorry to be so slow to get back to you.  I don't know how it's possible for the assignee to get a task with the category when the category was removed prior to the task request going out.  I'm not doubting that's what's happening, but I don't see how it's possible unless you've added a category between the time the request was sent and the assignee accepted it.  

It's not possible for the assignee to have something different than what you have.  You are essentially sharing a copy of the task.  If you have categories, then the assignee will also have categories.  If you want the assignee to not have any categories, then your copy of the task can't have categories.
0
 

Author Closing Comment

by:Senniger1
ID: 39912205
Thank you for the information and your assistance.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 39912604
You're welcome!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now