OLE and Collections
Keywords: OLE Collections
Question:
Here's a vba procedure that'll find each Add-In in excelSub junk() Dim x As Integer For x = 1 To Application.AddIns.Count MsgBox (Application.AddIns(x).Name) Next End SubI just don't know how to reference the collection of items (ie: Application.AddIns(x).Name) with winbatch. Does it have anything to do with the ( :: ) ???I can get winbatch to count how many...
xls = Objectopen("excel.application") xls.VISIBLE = @True xladd = xls.addins message("WBT Excel Addins", xladd.count) xls.Quit objectclose(xls)Answer:
Some older versions of WinBatch have had some problems with OLE. For example, I don't think WinBatch 99G handled "collections". You might try downloading the latest version of WinBatch. And try this...;This script works with 2000c msg = "" appExcel = Objectopen("excel.application") appExcel.VISIBLE = @True excelAddins = appExcel.addins addinCount = excelAddins.count For X = 1 To addinCount addin = excelAddins.item(X) addinName = addin.name msg = StrCat(msg, X, ". ", addinName, @CRLF) Next appExcel.Quit objectclose(appExcel) Message("WinBatch and Collections", msg)
Article ID: W14280Filename: OLE and Collections.txt