Importing Outlook Categories from another domain (Exchange 2016/Outlook 2016)

Dev Testing

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server 2013
Hello,

I am able to export Outlook Categories from one account in domain1.org, but when I import the same categories into a new account in domain2.org, the colors are not preserved and are assigned randomly. Is there any way to get the export to preserve the colors?

Thanks,
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

Dev Testing

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server 2013
HI Diane - thank you for the response. I exported them in Outlook using a new Note, saving it with the title of Category, then categorize the note with the ones I wanted to export; close the note. Then that creates a Category.msg file that you can drag onto your desktop and then into the new Outlook Notes. Then, then you right click your primary folder in Outlook and select Data File properties, there is a button Upgrade to Color Categories, so I clicked that. The categories are in fact uploaded but the colors are randomly assigned in the new account. I'd be interested in looking at your solution - thank you for posting.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yeah, that moves the names, but colors are randomly assigned. (Random compared to the original list - they are assigned in the order they are added to the master list.)

You can also do it using powershell - this gets the default account's categories. you can save it as a csv or txt, as long as its changed both places. (If you want to edit it, it might be easier in Excel - so use csv.)

open powershell ise and paste the script in a new script window then click run.

Code:
$outlook = New-Object -ComObject Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
$namespace.categories | Export-CSV .\Categories.txt
and this adds the list to the default account on the other computer;
Code:
$outlook = New-Object -ComObject Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
Import-CSV .\Categories.txt |
ForEach-Object {
    $namespace.Categories.Add($_.Name,$_.Color,$_.ShortCutKey)
}

You can use this to clear the list - but will need to run it multiple times to remove all names (it goes forward, not backwards, so it skips every other one) - make a list using the first powershell, then run this to remove them. Run the first script on the old computer, the copy the text file to the new one and run the second script.
Code:
$outlook = New-Object -ComObject Outlook.Application
$namespace = $outlook.GetNamespace("MAPI")
Import-CSV .\Categories.txt |
ForEach-Object {
    $namespace.Categories.Remove($_.CategoryID)
}
 

Similar threads


Top