Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

VB automation only crashes with Word 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oscar - 04 Jan 2006 09:46 GMT
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
Doug Robbins - Word MVP - 04 Jan 2006 12:58 GMT
See the article "Early vs. Late Binding" at:

http://www.word.mvps.org/FAQs/InterDev/EarlyvsLateBinding.htm

Basically, you need to develop the application on the earliest version on
which it will be run.
Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have a small VB application which uses the MS Word Automation Object
>Library to open a Word document automatically by coding :
[quoted text clipped - 21 lines]
>
> Oscar
Oscar - 04 Jan 2006 22:18 GMT
Thanks Doug,

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

> See the article "Early vs. Late Binding" at:
>
[quoted text clipped - 28 lines]
>>
>> Oscar

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.