• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 982
  • Last Modified:

Recover Outlook 2007 (Exchange 2007) Calendar Categories

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
Tomster2
Asked:
Tomster2
  • 5
  • 3
1 Solution
 
David LeeCommented:
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
 
Tomster2Author Commented:
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
 
David LeeCommented:
Yes, that's correct.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
Tomster2Author Commented:
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
 
David LeeCommented:
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
 
David LeeCommented:
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
 
Tomster2Author Commented:
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
 
David LeeCommented:
You're welcome.  Happy to be able to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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