Mac API
Microsoft 并未正式支持 API, 但通过一些研究,可以在线找到更多声明
Office 2016 for Mac 是沙盒
与支持 VBA 的其他 Office 应用程序版本不同,Office 2016 for Mac 应用程序是沙盒式的。
沙盒限制应用程序访问应用程序容器外部的资源。这会影响涉及跨进程的文件访问或通信的任何加载项或宏。你可以使用以下部分中描述的新命令最小化沙盒的影响。Office 2016 for Mac 的新 VBA 命令
以下 VBA 命令是 Office 2016 for Mac 的新增功能。
命令 | 用来 |
---|---|
GrantAccessToMultipleFiles | 请求用户一次访问多个文件的权限 |
AppleScriptTask | 从 VB 调用外部 AppleScript 脚本 |
MAC_OFFICE_VERSION | 编译时不同 Mac Office 版本之间的 IFDEF |
Private Declare Function system Lib "libc.dylib" (ByVal command As String) As Long
Private Declare Function popen Lib "libc.dylib" (ByVal command As String, ByVal mode As String) As Long
Private Declare Function pclose Lib "libc.dylib" (ByVal file As Long) As Long
Private Declare Function fread Lib "libc.dylib" (ByVal outStr As String, ByVal size As Long, ByVal items As Long, ByVal stream As Long) As Long
Private Declare Function feof Lib "libc.dylib" (ByVal file As Long) As Long
Private Declare PtrSafe Function popen Lib "libc.dylib" (ByVal command As String, ByVal mode As String) As LongPtr
Private Declare PtrSafe Function pclose Lib "libc.dylib" (ByVal file As LongPtr) As Long
Private Declare PtrSafe Function fread Lib "libc.dylib" (ByVal outStr As String, ByVal size As LongPtr, ByVal items As LongPtr, ByVal stream As LongPtr) As Long
Private Declare PtrSafe Function feof Lib "libc.dylib" (ByVal file As LongPtr) As LongPtr