Solved

Recover Outlook 2007 (Exchange 2007) Calendar Categories

Posted on 2009-05-18
8
969 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

733 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