View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nick S.[_2_] Nick S.[_2_] is offline
external usenet poster
 
Posts: 1
Default Automating Excel with add-in

Hi all!

I have the following problem with automating Excel 2003.

I automate it from WSH. The idea is to open a workbook (wkbk.xls),
wait for a definite amount of time (30 sec.),
then save it and close Excel.

Using standard procedure (in a VBS script):

wkbk = "...path...\wkbk.xls"
set oExcel = CreateObject("Excel.Application")
oExcel.Workbooks.Open wkbk
WScript.Sleep 30000
oExcel.ActiveWorkBook.Save
oExcel.ActiveWorkBook.Close
oExcel.Quit

everything works as expected.

The problem is that Excel is setup on my computer with an add-in
that fetches some data from the internet while the wkbk.xls is open.

If I double-click wkbk.xls this operation is performed OK,
while if wkbk.xls is open by the above script, it is not:
if (during the 30 sec. period) I check Tools - Add-Ins
the add-in is not even listed among the Add-ins available.

How can I force the Excel aplication object to be "started"
with the required add-in?

TIA,
Nick