Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 353
  • Last Modified:

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

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
Senniger1
Asked:
Senniger1
  • 4
  • 3
1 Solution
 
David LeeCommented:
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
 
Senniger1Author Commented:
I'm open to a macro so yes, please post.

Thank you!
0
 
David LeeCommented:
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
Senniger1Author Commented:
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
 
David LeeCommented:
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
 
Senniger1Author Commented:
Thank you for the information and your assistance.
0
 
David LeeCommented:
You're welcome!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now