# Visual Basic > Office Development > MsOf365 Outlook Categories

## ubkra

Is it possible to capture when an email gets a category assigned to it or removed from it? 

Perhaps in the way of a log.

----------


## jdc2000

Possible?  Probably, but if you are wanting the actual date and time when this happened, you would probably need an Outlook macro running continuously.  This would likely seriously degrade performance.

What would you want to do with this information after you got it?  There may be an alternative.

----------


## ubkra

I have a team working on a mailbox, I use categories to say Bob is red and picking up emails A, B and C. I want to log when and email is assigned and unassigned a category as Bob sometimes puts them back in the list unassigned and I want to audit this.

----------


## jdc2000

How are the category assignments currently being made?  This would be the time to capture that data.  Then, you could later create a report of emails in the Unassigned list or folder and compare those against the previously assigned list.  It should not matter when any were transferred back to Unassigned.

----------


## ubkra

They are being assigned by myself when I read them and in some cases by rules.

----------


## jdc2000

You can get reports of the emails in folders periodically.

Possibly useful links:

https://answers.microsoft.com/en-us/...7-f1c9f831f01f

https://www.extendoffice.com/documen...cs-report.html

You could then compare the data in later reports to see if emails got moved back to the Inbox or other folder(s).  Macro code could be created to automate the comparisons.

----------


## ubkra

That appears to work on my default mailbox only, not a secondary shared mailbox?

It also looks like it's a manual one time report, I'd need to run it every 15 minutes etc.

The second link is for an extension which isn't approved by my corporation so I can't install it.

----------

