Jens,

Your arrayenumvalue is pulling the Value, not the data string in the value of the Registry.

1 is the value custom.dic is the data string in the value.

i.e.
1
2
3
4
5

etc... is the Value for this Registry Key
HKEY_CURRENT_USER\Software\Microsoft\Shared Tools\Proofing Tools\Custom Dictionaries

Then CUSTOM.DIC is the entry for number 1 normally, but then users could enter or have any number of additional custom dictionaries for MS Office.

I want to find out what the data in 1, 2, 3, etc.. is and if it finds MyCustom.dic then do nothing, if it is not found I want to go ahead and create the next available number and insert my text string of MyCustom.dic into that number value.

i.e. This needs to prevent duplicates and overwrites.

Does anyone have any other ideas on how to accomplish this?

Howard, Jens, Rad, Bryce, Chris, Jochen, others?