ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Coping with multiple versions of Office (https://www.excelbanter.com/excel-programming/374109-coping-multiple-versions-office.html)

travis[_3_]

Coping with multiple versions of Office
 
I have an Excel app which will be used by users with office XP and 2003
(and soon 2007).

I've heard there is a dynamic way to set object library references for
different versions of office. i.e. to test what version is running and
then reference the Word 10 or Word 11 libraries as appropriate.

How?

Travis


Dave Peterson

Coping with multiple versions of Office
 
I would think that it would much easier/safer to use late binding--and never
worry about what version of MSWord is being used:

You might want to look at the way Dick Kusleika does it:
http://www.dicks-clicks.com/excel/olBinding.htm

You may want to look at these links that Tom Ogilvy posted recently:

Here are some more extensive references on binding:

Use late binding - don't have a reference to excel.

http://support.microsoft.com/default...b;EN-US;244167
INFO: Writing Automation Clients for Multiple Office Versions

http://support.microsoft.com/default...b;en-us;245115
INFO: Using Early Binding and Late Binding in Automation

http://support.microsoft.com/default...b;en-us;247579
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible



travis wrote:

I have an Excel app which will be used by users with office XP and 2003
(and soon 2007).

I've heard there is a dynamic way to set object library references for
different versions of office. i.e. to test what version is running and
then reference the Word 10 or Word 11 libraries as appropriate.

How?

Travis


--

Dave Peterson


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com