reference to Excel 10.0 library

M

Mike Feltman

I have a small Access database application that I am
bringing up a spreadsheet on click of a button. When I
compile in Office Developer 2002 I only have the choice to
reference "Microsoft Office Excel 10.0" library, (which
references ...\Office 10\EXCEL.EXE.

When I build my package with the Office Developer Package
Wizard it does not show a dependency on any Excel library
or file. I can include the EXCEL.EXE file in the package
but it does not have any affect on the package when I put
it on a Windows 2000 machine, running Office 2000. I am
getting errors on the Win 2000 machine because Access
Runtime cannot compile the code because of broken
references.

I thought there might be a library that I could link to
for Office Developer that might contain the calls to other
Microsoft applications, but I tried taking out the Excel
reference and referencing many other libraries with no
luck.

Is there anything I can do?
Should I try to install the older Office references on my
Win2000 machine running Office Developer 2002?
I would rather deliver the references that I need with my
runtime application.
 
T

Tom Winter

Mike Feltman said:
I have a small Access database application that I am
bringing up a spreadsheet on click of a button. When I
compile in Office Developer 2002 I only have the choice to
reference "Microsoft Office Excel 10.0" library, (which
references ...\Office 10\EXCEL.EXE.

When I build my package with the Office Developer Package
Wizard it does not show a dependency on any Excel library
or file. I can include the EXCEL.EXE file in the package
but it does not have any affect on the package when I put
it on a Windows 2000 machine, running Office 2000. I am
getting errors on the Win 2000 machine because Access
Runtime cannot compile the code because of broken
references.

I thought there might be a library that I could link to
for Office Developer that might contain the calls to other
Microsoft applications, but I tried taking out the Excel
reference and referencing many other libraries with no
luck.

Is there anything I can do?
Should I try to install the older Office references on my
Win2000 machine running Office Developer 2002?
I would rather deliver the references that I need with my
runtime application.

First, you NEVER distribute EXCEL.EXE, etc. or any of the files in the
OFFICE## folder. These are part of the office program and you do not have
the legal right to redistribute them. (That's why they don't show up in the
Package Wizard.) You will be installing your application on a machine that
all ready has Office installed, and that will have to suffice.

Your problem is coming because you are developing your application while
referencing Office 2002, but then trying to use it on a machine with Office
2000. When you do early binding (for example Dim oDocument as
Word.Document), your VB (I assume) application will be expecting the Office
2002 application. You will often have problems then on machines with older
versions of Office. "You can't go back" as they say. You can only go forward
(that is, your application would have no problems on a system with Office
2003). There are two solutions to your problem: 1. On your development
machine, install Office 2000 (Office 2000 and Office 2002 can coexist on one
machine (except for Outlook)), then reference the Office 2000 type libraries
in your applicaiton. Or 2. Use late binding (Dim oDocument as Object). When
you use late binding, (all your objects are DIM'ed as OBJECT) your
application won't be expecting any particular version of Office and will use
whatever version is there.

If you would like me to explain that a bit more, let me know!

-Tom
(e-mail address removed)
 

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