|
楼主 |
发表于 2017-8-11 18:00
|
显示全部楼层
本帖最后由 cyfx2288 于 2017-8-11 19:29 编辑
你应该用的是Win10操作系统,我在Win7 + office2016(64位版)环境下测试过,没问题。
相关语句为:
#If VBA7 Then
Private Declare PtrSafe Function LCMapString Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Long, _
ByVal dwMapFlags As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, ByVal lpDestStr As String, ByVal cchDest As Long) As Long
Private Declare PtrSafe Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
#Else
Private Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (ByVal Locale As Long, _
ByVal dwMapFlags As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, ByVal lpDestStr As String, ByVal cchDest As Long) As Long
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
#End If
这个判断可以保证WinXP-Win& + Ofifice2003-2016环境下正常运行,Win7以上环境没有测试。
|
|