简体   繁体   English

excel与vbscript一起使用第三方COM ADD-IN

[英]excel with vbscript which is using third party COM ADD-IN

I want to automate a process in excel with vbscript which is using third party COM ADD-IN 我想使用vbscript在excel中使用第三方COM ADD-IN自动执行一个过程

Sub LoadAddIn()
Dim oComAddIn As COMAddIn
Set oComAddIn = Application.COMAddIns.Item("C:\Program Files (x86)\Thomson Reuters\Eikon\EikonOfficeShim.dll")
oComAddIn.Connect = True

CreateFolder

End Sub

But while running excel from vbscript, it is opening without any add-ins enabled and formula which is using the above add-in are not working. 但是,从vbscript运行excel时,它没有启用任何加载项就已打开,并且使用上述加载项的公式不起作用。

I googled so many websites but not getting exact syntax to use to connect third party add-in while executing excel from vbscript. 我在很多网站上用谷歌搜索,但是在从vbscript执行excel时没有获得用于连接第三方插件的确切语法。

I can open the EIKON AddIn and start the process using the following: 我可以使用以下命令打开EIKON加载项并开始该过程:

'Start EIKON Update
Dim RetVal As Long
RetVal = ExecCmd("C:\Program Files (x86)\Thomson Reuters\Eikon\eikon.exe -officeexcel -a " & sPath)

Note that sPath is the full string path of the file I am opening. 请注意,sPath是我打开的文件的完整字符串路径。

Caveat: The file does not automatically close. 注意:该文件不会自动关闭。 I'm still working on that part. 我仍在努力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM