|
-
Apr 12th, 2000, 10:42 PM
#2
Addicted Member
This is how I check for 95 or 97. I don't use 2000 yet.
Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Dim nlKeyHandle As Long
If RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\8.0", 0, KEY_ALL_ACCESS, nlKeyHandle) = ERROR_NONE Then
appmain_sGetWordVersion = "Word97"
RegCloseKey (nlKeyHandle)
ElseIf RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Microsoft Office\95", 0, KEY_ALL_ACCESS, nlKeyHandle) = ERROR_NONE Then
appmain_sGetWordVersion = "Word95"
RegCloseKey (nlKeyHandle)
Else
appmain_sGetWordVersion = "None"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|