VB automation only crashes with Word 2000

O

Oscar

I have a small VB application which uses the MS Word Automation Object
Library to open a Word document automatically by coding :

Set objword = CreateObject("Word.application")
objword.Documents.Open (FilePath), , True
For Each bmBookMark In objword.ActiveDocument.Bookmarks
.....do some processing

While this has worked all the time in many user configurations, it shows
that users who have MS Word 200 installed on their machine face an
application crash which reports that the application has performed an
illegal action. The problem ony shows when MS Word 2000 is installed. One of
the users could solve the problem by installing Word XP and I never received
any problem with Word XP. So the problem must be the Word 2000.
One of the users reported me their MS Word 200 version : Word 2000 9.03821
SR1

In my VB project I have set a reference to the MS Word 10.0 Object Library

Any suggestion how I can solve this problem for the specific case of MS Word
2000 ?

regards,

Oscar
 
O

Oscar

Thanks Doug,

I could solve the version incompatibility problem by using late binding.
 

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