Here is the code which checks the existence of the aforementioned key. The API code is wrapped in a function which returns True if word exists and False otherwise.
___
[tt]
Option Explicit
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegQueryValue Lib "advapi32" Alias "RegQueryValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpValue As String, lpcbValue As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
Function DoesWordExist() As Boolean
Dim hKey As Long, RetVal As Long
Const HKEY_LOCAL_MACHINE = &H80000002
Const KEY_QUERY_VALUE = &H1
Const ERROR_SUCCESS = 0&
RetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe", 0, KEY_QUERY_VALUE, hKey)
RegCloseKey hKey
DoesWordExist = RetVal = ERROR_SUCCESS
End Function
Private Sub Form_Load()
MsgBox DoesWordExist
Unload Me
End Sub
[/tt]