VBA:在Office for Mac中压缩文件

我喜欢在Microsoft Excel 2016 for Mac版本15.23.2(160624)下压缩文件。 我写了一个应用程序,它将所有的文件作为命令行parameter passing。 现在,我必须从VBA调用该应用程序,并将文件path作为命令行参数提供。 我从这个答案开始,但遇到问题:

当使用Shell命令时,我得到运行时错误53(找不到文件)。 但是由于这个消息来源说,这个命令不是命令行参数,我无法使用它。

当使用MacScript命令时,我得到运行时错误5(无效的过程调用或无效的参数)。

所以我试着用链接答案中build议的标准C库中的system()函数。 在这里我得到了以下testing结果:

 Private Declare Function system Lib "libc.dylib" (ByVal command As String) As Long Call system("open -a Safari --args http://www.google.com") 'Example 1: starts Safari, but does not load google Call system("open -a Safari http://www.google.com") 'Example 2: starts Safari and loads google Call system("open -a Zipper") 'starts my application Call system("open -a Zipper arg1 arg2") 'does not even start my application! Call system("open -a Zipper --args arg1 arg2") 'starts my application, but without passing the parameters arg1 and arg2 

我必须做什么,使用提供的命令行参数来启动我的应用程序?

另一个想法是,在dylib库中提供压缩function。 但是我怎么能创build这样一个图书馆呢? Xcode和Swift可以吗? 或者是否有这样的文件可用,如果可以的话,我怎样才能使用它(我只是在这里find一个没有答案的问题 )