View Single Post
  #2  
Old December 12th 07, 06:46 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Read and write master categories list



For OL XP and 2003 it's stored in HEX values.

For OL 2000 it's plain text; and for OL 2007 it's not stored in the registry
but in a hidden message in the default calendar.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Tue, 11 Dec 2007 17:38:18 -0800 (PST) schrieb MA:

Hi,

I need to read the Outlook master categories and write an new entry to
the list. It appear the master categories stored in registry
(HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Outlook\Categories).
Is this correct for the OL 2003 onwards? BTW, my solution will have
prerequisite to OL 2003.

How can I read and write the categories list. I am using the
redemption and can not see anything in there which simplify. Anyway so
far I have the following code but the value I get is decimal....

-----------------------------------
string categories = string.Empty;

RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microso ft
\Office\11.0\Outlook\Categories", false);
if (key != null)
{
try
{
byte[] holder = (byte[])key.GetValue("MasterList");
for (int x = 0; x holder.Length; x++)
{
categories = categories + holder[x].ToString();
}
}
finally
{
key.Close();
}
}

----------------------------------

Thanks in advance for your help.

Regards,
MA

Ads