Public Const SW_NORMAL = 1
Public Const SW_MINIMIZE = 6
Public Const HKEY_CURRENT_USER = &H80000001
Public Const KEY_QUERY_VALUE = &H1
Public Const REG_SZ = 1 ; ; ; ; ; ; ; ; ; ; ; ; ' Unicode nul terminated string
Public 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
Public Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long ; ; ; ; ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub Foxmail()
'
; ; On Error Resume Next
'HKEY_CURRENT_USER/Software/Aerofox/FoxMail/V3.1
'FoxMailPath
; ; Dim hKey As Long
; ; Dim tmpStr As String * 255
; ; Dim PathLen As Long
; ;
; ; If RegOpenKeyEx(HKEY_CURRENT_USER, "Software/Aerofox/FoxMail/V3.1", 0, KEY_QUERY_VALUE, hKey) <> 0 Then
; ; ; Exit Sub
; ; End If
; ; PathLen = Len(tmpStr)
; ; If RegQueryValueEx(hKey, "FoxmailPath", 0, REG_SZ, ByVal tmpStr, PathLen) <> 0 Then
; ; ; Exit Sub
; ; ; RegCloseKey hKey
; ; End If
; ; RegCloseKey hKey
; ; FoxmailPath = Trim(Left(tmpStr, PathLen))
; ; ActiveDocument.Save
; ; If (ActiveDocument.Path <> "") And (ActiveDocument.FullName <> "") Then
; ; ; ShellExecute 0, "Open", FoxmailPath, """" & ActiveDocument.FullName & """", "", SW_NORMAL
; ; End If
End Sub