Excel from Word: Starting XLStart files automatically

E

Ed

I want to call Excel from Word. I use the VBA code that is readily available
on (among other places) the Word MVP site. (essentially "Set oXL =
GetObject(, "Excel.Application")"), and Excel opens nicely.

However, I have a VBA project that I wrote for Excel, and that resides in
the XLStart folder, that I need to run. It adds controls that will feed data
back to Word.

When I call Excel via Word (above code), only a 'pure' version of Excel is
called, and the VBA project in the XLStart folder doesn't load. I can
navigate to it and start it, but that is too time consuming (and expects too
much from a non-sophisticated user.)

Is there anyway to automaticall load the 'myproject.xla' file when I call
Excel from Word.

Thanks,

Ed (in Virginia)
 
J

Jonathan West

You're probably better off asking this in
microsoft.public.excel.programming. But I can make a guess at a solution.
Each add-in is a member of the AddIns collection in Excel, and you can set
whether the addin is loaded by changing the Installed property of the
add-in.

You should be able to code this from the controlling application in Word,
first of all identifying your addin, and then changing its Installed
property. If this doesn't work, I suggest you repeat the question over in
the Excel group.
 
E

Ed

Jonathan,

You put me on the right path. From your tip, I was able to determine
that xla files located in the "Library" folder (as opposed to the XLStart
folder) are the ones that are automatically loaded/installed. I put my .xla
file there and it worked perfectly. Thanks!

Ed (in Virginia)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top