Corrections for Word 2010 64 bit compatibility
1 vbaKernelStuff
Code:
#If VBA7 Then
Private Declare PtrSafe Function WaitForSingleObject Lib "kernel32" ( _
ByVal hHandle As LongPtr, _
ByVal dwMilliseconds As Long) As Long
Private Declare PtrSafe Function OpenProcess Lib "kernel32.dll" ( _
ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As LongPtr, _
ByVal dwProcessId As LongPtr) As LongPtr
Private Declare PtrSafe Function CloseHandle Lib "kernel32" ( _
ByVal hObject As LongPtr) As Long
#Else
Private Declare Function WaitForSingleObject Lib "kernel32" ( _
ByVal hHandle As Long, _
ByVal dwMilliseconds As Long) As Long
Private Declare Function OpenProcess Lib "kernel32.dll" ( _
ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" ( _
ByVal hObject As Long) As Long
#End If
Code:
#If VBA7 Then
Dim TaskID As LongPtr
Dim ProcHandle As LongPtr
#Else
Dim TaskID As Long
Dim ProcHandle As Long
#End If
2: eBookCommon
Code:
#If VBA7 Then
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#Else
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
3: datBookCreatorProperties
Code:
strPFPath = VBA.Environ("ProgramFiles(x86)")
If strPFPath = "" Then
strPFPath = VBA.Environ("ProgramFiles")
End If
setCalibrePath strPFPath + "\Calibre"
End If