Running python from VBA word and returning a value

微笑、不失礼 提交于 2019-12-06 15:15:17

You can use the MacScript function to run a do shell script command.

VBA code example:

myAppleScript = "do shell script ""/usr/bin/python -c 'import urllib2; web1=urllib2.urlopen(\""http://www.apple.com\""); print(web1.read())' """
htmlText = MacScript(myAppleScript) 'get the source from an URL
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!