Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook Categories
Message
De
02/10/2002 11:02:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00703249
Message ID:
00706875
Vues:
18
>>Does anyone know how to programmatically retrieve all of the categories from the Outlook Master Category List including those added by the user? I can retrieve categories for a specific contact or appointment if one or more categories have been selected. However, I'm needing to get to the Master Category List. Anybody done this before that would like to enlighten me?
>
>Whew, this took a while to figure out. The Master Category List, including categories added by the user is stored as binary in the registry. Using the Windows Scripting Host (WSH), you can read this value
>
>
>DIMENSION laTest[1]
>* read hex values into array
>WshShell = CreateObject("WScript.Shell")
>laTest = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Categories\MasterList")
>lcString = ''
>FOR i = 1 TO (ALEN(laTest) - 2) STEP 2 && skip every 2nd character since it is a space
>    * convert ascii code to character
>    lcString = lcString + CHR(laTest(i))
>ENDFOR
>? lcString
>
Every second character a space? That looks like double-byte characters. Perhaps strconv() can make for a simpler conversion.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform