Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook Categories
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00703249
Message ID:
00707130
Views:
29
Evan,

I just thought of something else that puts a "fly in the ointment", so to speak. This is for a vertical market application with end-users running anything from Win95 on up. Do you know of a solution without using the WSH since the WSH is normally only available on Win2K and up operating systems? Do you know of some possible Win32 API calls that will perform the same magic? I'm just trying to figure out a solution that will work on any Windows platform. Sure wish this was available via the Outlook object model.

Thanks again for all your suggestions. I appreciate the time you've spent on this already.

James


>Or you could query if the key exists before trying to read it.
>
>
>loReg = NEWOBJECT("Registry", HOME() + "ffc\registry")
>? loReg.iskey('Software\Microsoft\Office\10.0\Outlook\Categories',-2147483647)
>
>Testing the two approaches will reveal which is faster.
>
>No problem!. :-)
>
>>Thanks so much for your reply. I will give your solution a try later this evening. One thing that immediately comes to mind after looking at your code is, how do I determine the registry key to use when I will not know which version of Outlook the end user will be running? I wonder if the only thing in the key that will be different would be the version number. If that is the case, maybe I could increment through a version number until the array is created???
>>
>>Any ideas on this one?
>>
>>Thanks again,
>>
>>James
>>
>>
>>>>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
>>>
James Moore
Owner/Developer
Ministry Tracking Software, Inc.
www.youthtrack.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform