mjohnson wrote:
> I am having a problem with an excel add-in which is installed via
> xlApp.Workbooks.Open("C:/Program
> Files/Program/XLOF32.xla").RunAutoMacros(1)
>
> I can then add the add-in and install it via
> xlApp.AddIns.Add ("C:/Program Files/Program/XLOF32.xla",True)
> xlApp.AddIns.Item(Index='Excel Functions').Installed=True
>
> My problem is that the macro may have already been run, which
> generates a dialog warning that it is already open.
>
> The question, is there a way of detecting whether the add-in is
> already open?

Well, xlApp.AddIns is a collection.  You should be able to query the
collection item by item and check to see whether the add-in is present.

I'm leaving the code as "an exercise for the reader", but something like
this should be possible:
    for addin in range( xlApp.AddIns.Count ):
        if xlApp.AddIns.item(addin).Filename???
I don't know exactly which property you'd need to query.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to