Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different versions of object libraries

Status
Not open for further replies.

GMcFly

Programmer
Oct 2, 2002
48
NL
Hi all.
I'm using Office XP and, because of that, have the Microsoft Word 10.0 Object Library. If I run a simple code on a computer using Office 2000 or below, it doesn't work which I understand because those computers don't have the same libraries. What should I do as a programmer to make it work on their computer? I can't reference to those libraries when I compile my application because I don't have lower versions of the library!
Thanks for your help.
 

As a programmer you need to design on the lowest common denominator as possible. Meaning if you want to have your application work on Win95/Office 97 then you will need to design/code/compile in that environment.

Good Luck

 
There is really no other way of doing this?? Because I have XP installed. That would mean I have to install Win98 + Office 97 for example and do all my work under 98??
 

Not that I know of, unless you do late binding where you are not adding a reference to your project, but creating it on the fly. The other alternative that I use is a two drive system with one of the drives (C:) being removable and I have different OS's on different drives and the second drive is where I keep all my code. Then again their is a multiple boot system but I do not recommend this since I have always had problems and everyone that I have talked to about this has had some problems or another.

Good Luck

 
Thanks for your help. Did you ever think of "late binding"? How does it work? I'll try looking online for it anyway. Thanks
 

Have I ever thought of late binding? Of course, but it depends upon the requirements.

late binding = create object

In help on the index tab type in "late binding" you will see a couple of topics, some of which will be helpful to you. The following excerpt is from "late binding and version compatibility" at the bottom of the page...
[tt]
Limited Protection For Late-Bound Client Applications
Late binding is used when variables are declared As Object, because the compiler doesn’t know the class ID of the objects and interfaces that may be assigned to the variable at run time. Applications that use late binding create instances of your classes using the CreateObject function and the programmatic ID, as shown here:

Dim obj As Object
Set obj = CreateObject("MyComponent.MyObject")

The CreateObject function looks up the class ID in the Windows Registry, and uses it to create the object. Thus it will always create the most recent version of the object.

As long as you preserve binary compatibility, late-bound clients will continue to work successfully with your component.

If you make an incompatible version of your component using the same programmatic IDs for your objects, late-bound clients can still create the objects, because they’re looking up the class ID instead of having it compiled in. When they call methods whose arguments have changed, or methods you’ve deleted, program failure or data corruption may occur.

For More Information See "Levels of Binary Version Compatibility" for a description of the degrees of compatibility employed by Visual Basic. See "Version Compatibility" for a list of topics related to this feature. See "Polymorphism, Interfaces, Type Libraries, and GUIDs," in "General Principles of Component Design" for background information and concepts.
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top