Solved

Recover Outlook 2007 (Exchange 2007) Calendar Categories

Posted on 2009-05-18
8
968 Views
Last Modified: 2012-05-07
We had a problem recently and we had to create a new user profile for one user.  This user relies extensively on Calendar Categories and Colors.  With the new profile, these are all gone.

Any info on if the categories and colors are recoverable (and from where) would be greatly appreciated.

Note: I saw one post that said the categories are in the registry... but if that is the case, why would they be gone after we created the new profile?  Does that entry get overwritten when the new profile is created?
0
Comment
Question by:Tomster2
  • 5
  • 3
8 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24414413
Hi, Tomster2.

Outlook 2007 does not store categories in the registry.  Previous version so Outlook did, but 2007 stores them in a hidden folder in the user's mailbox (Exchange) or PST file (internet mail).  The categories values (i.e. the categories assigned to a given item) are stored in the items themselves.  So, it depends on what you mean when you say you "had to create a new user profile".  If that means a new account (if on Exchange) or a new PST file (if not on Exchange), then the category info (master catergory list and colors) are gone.  
0
 

Author Comment

by:Tomster2
ID: 24415524
We created a new user profile on the laptop under Control Panel | Mail | profiles.  

Also, the old account on Exchange became corrupted... so a new account was created and the data (emails, tasks, calendar, contacts) were rolled into the new account.

I think you are saying that although we moved the data over, the hidden folder with the calendar categories was left behind.  Is that correct?




0
 
LVL 76

Expert Comment

by:David Lee
ID: 24416213
Yes, that's correct.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:Tomster2
ID: 24416890
It appears MS has no utilities or functions to back up these settings preemptively.

Have you had any experience with:

http://www.vboffice.net/product.html?lang=en&cmd=detail&id=2006063

It seems to meet the need for backup and sharing of these settings.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24417627
I'm not familiar with that utility.  Saving and restoring categories is very simple from a scripting perspective.  If all you want to do is make a copy of the categories in case you need to restore them later, then you don't need the utility.  If you want the other features it offers, then that's a different matter.

Here's a script that backs up and restores categories.  The code comes in 2 parts.  This is part 1.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects
4.  Right-click on Class Modules, select Insert > Class Module
5.  In the Properties panel click on Name and enter CategoryBackup
6.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
7.  Edit the code as needed.  I included comments wherever something needs to or can change
8.  Click the diskette icon on the toolbar to save the changes
9.  Close the VB Editor


Option Explicit
 
'*** Constants'
Const CB_APPNAME = "CategoryBackup"
Const CB_VERSION = "1.0"
Const CB_PATH = "C:\eeTesting\Categories.bkp"   '<-- Change the path'
Const ForReading = 1
 
'*** Class Variables'
Private olkCategory As Outlook.Category, _
    objFSO As Object, _
    objFile As Object
    
Private Sub Class_Initialize()
    Set objFSO = CreateObject("Scripting.FileSystemObject")
End Sub
 
Private Sub Class_Terminate()
    Set objFSO = Nothing
End Sub
 
Public Sub Export()
    Set objFile = objFSO.CreateTextFile(CB_PATH, True)
    For Each olkCategory In Outlook.Session.Categories
        objFile.WriteLine olkCategory.Name & "," & olkCategory.Color & "," & olkCategory.ShortcutKey
    Next
    objFile.Close
End Sub
 
Public Sub Import()
    Dim strBuffer As String, arrValues As Variant
    Set objFile = objFSO.OpenTextFile(CB_PATH, ForReading)
    Do Until objFile.AtEndOfStream
        strBuffer = objFile.ReadLine
        arrValues = Split(strBuffer, ",")
        Outlook.Session.Categories.Add arrValues(0), arrValues(1), arrValues(2)
    Loop
    objFile.Close
End Sub

Open in new window

0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24417637
Part 2

Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects
4.  If not already expanded, expand Modules
5.  Select an existing module (e.g. Module1) by double-clicking on it or create a new module by right-clicking Modules and selecting Insert > Module.
6.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
7.  Edit the code as needed.  I included comments wherever something needs to or can change
8.  Click the diskette icon on the toolbar to save the changes
9.  Close the VB Editor
10. Run the macro that performs the operation of your choice
Sub ExportCategories()
    Dim olkCB As New CategoryBackup
    olkCB.Export
    Set olkCB = Nothing
End Sub
 
Sub ImportCategories()
    Dim olkCB As New CategoryBackup
    olkCB.Import
    Set olkCB = Nothing
End Sub

Open in new window

0
 

Author Comment

by:Tomster2
ID: 24417743
Wow! Very generous of you.  Obviously you have faced this problem before.  Thank you so much for sharing.  Will post back with results... but you get the points.

Tomster2
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24417778
You're welcome.  Happy to be able to help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

861 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