About references for multiple versions of Office

V

VanS

Hello,
I have an Office VBA app in Excel and Word. I've gotton a bit rusty: I need
to support from back to Office 2000 forward to Office 2007. Per the MS KB
articles if I use early binding I need to include references to earliest
Office version (here Office 2000). Which reference files would I need to
include if I do that? Should I include them in my installer app?
But the MS KB articles seem to indicate a preference for late binding-this
seems less risky. Any thoughts on that? I have tried early binding but it
seems such a hassle.
Thanks, God bless
Van
 
C

Cindy M.

Hi =?Utf-8?B?VmFuUw==?=,
I have an Office VBA app in Excel and Word. I've gotton a bit rusty: I need
to support from back to Office 2000 forward to Office 2007. Per the MS KB
articles if I use early binding I need to include references to earliest
Office version (here Office 2000). Which reference files would I need to
include if I do that? Should I include them in my installer app?
But the MS KB articles seem to indicate a preference for late binding-this
seems less risky. Any thoughts on that? I have tried early binding but it
seems such a hassle.
Normally, the Office app should see the earlier reference and automatically
update it to a newer one. Going the other way is less reliable (to say nothing
of the fact that you might use something not available to an older version).

Generally, if your app works on your machine, then the references are set. You
don't need to do anything in addition. And with VBA you certainly should not
try to distribute anything. Either the applications are installed and
registered on the users' machines or they're not.

In a VBA app, late-binding will be significantly slower. It can avoid problems
if Office should "hiccup" and not automatically switch references. But if you
start out with late-binding you won't have the benefit of Intellisense, so it
can make sense to do the work with early binding, then switch over to
late-binding (just change Dim xxx As Word.whatever to Dim xxx as Object) at
the end.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
V

VanS

Hi Cindy,
Thanks for your reply.
Maybe I didn't make it clear, but my app will be distributed to numerous
clients with each with their own version of Office though as said I won't
support earlier than Office 2000. So it needs to work for multiple platforms.
The MS KB articles seem to say that late-binding is best for that. Do you
disagree? Are you saying in the early stages of processes use early binding
but later used processes late binding is ok? I like to keep things simple,
and if per the KB articles I need to set the references (or rather per what
you are saying just compile under Office 2000 to set the references) to the
earliest version I will support, should I just go ahead and do that?
Thanks, God bless
Van
 
C

Cindy M.

Hi =?Utf-8?B?VmFuUw==?=,
Maybe I didn't make it clear, but my app will be distributed to numerous
clients with each with their own version of Office though as said I won't
support earlier than Office 2000. So it needs to work for multiple platforms.
The MS KB articles seem to say that late-binding is best for that. Do you
disagree? Are you saying in the early stages of processes use early binding
but later used processes late binding is ok? I like to keep things simple,
and if per the KB articles I need to set the references (or rather per what
you are saying just compile under Office 2000 to set the references) to the
earliest version I will support, should I just go ahead and do that?
Normally, it should work to develop and compile with Office 2000. Office
*should* automatically take care of "upgrading" a reference to a newer version.

Since that's not 100% reliable (maybe 99%), you can use late-binding for higher
reliability.

Yes, you can code using early binding and later switch to late binding.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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