We help IT Professionals succeed at work.

Word Object Crashes

aotodd
aotodd asked
on
I have a problem with an instance of Word 97 crashing in my VB app.

I've developed the app on an Office 2K machine and whenever I run it on an Office 97 machine the Word object seems to be created OK but when I try and do anything with it (eg : WordApp.Documents.Add or WordApp.Documents.Open) it causes a memory address crash.

It's fine with office 2K machines and if I re-compile on an Office 97 machine it works in both 97 and 2K!!

I know the app has references to the Word 2K object library but if this is a problem how do I develop for 97 systems??

Any help greatly appreciated.

Regards.
Comment
Watch Question

Commented:
Three options....  Use 97 References, and that will work on both 97 and 2000.  Second Distribute the Microsoft 9(2000) objects with your program, and run the install on all machines. Three, upgrade all machines to 2000.

Depending on licences, the third option maybe the easiest for you, as long as you can get someone else to do it...

Cheers,
CJ.
 
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
agree

Author

Commented:
In the past I've tried installing 97 and using Word 8 rather than Word 9 but VB automatically uses the higher version of the object when compiled?  Can I compile with older objects selected?

Commented:
You need to have both versions of Word Installed on your machines, which is tricky.  Either that, or get the Word 8 Dll from a Office 97 computer and copy it into your Project directory.  Then go to references and choose browse, and then pick the Word 8 DLL.  This will add it your project.  If you  package and deploy your program, it will include the Word 8 objects for you.  Like I said in my previous post, if you can upgrade all your machines to Office 2000, it does make things easier for you.

Cheers,

CJ.

Author

Commented:
In the past I've tried installing 97 and using Word 8 rather than Word 9 but VB automatically uses the higher version of the object when compiled?  Can I compile with older objects selected?

Commented:
Instead of using Word 9 in your references, can you select Word 8, once you have installed both versions of Word?  Else, do as I said in my previous post can get a copy of the MSWORD8.OLB file, put it in your project folder and add it to your references by clicking on browse in the references section.

Cheers,

CJ.

Commented:
This question appears to have been abandoned. A Moderator will be asked to
close this question after seven days, with the following recommended
disposition:

Points to CJHarrap

If you have any comment or objection to the recommendation, please leave it here.

guidway
EE Cleanup Volunteer

Per recommendation, force-accepted.

Netminder
CS Moderator

Explore More ContentExplore courses, solutions, and other research materials related to this topic.