Help with Automation to Word

B

Byron

I have been successfully using Automation to merge
information from a specific record in Access 97 to Word
97, using Bookmarks.

I recently installed the Office XP Professional suite,
including Access, Excel and Outlook. I did not originally
install Word from this package as were were only using
Word 97. I then had a need to install Word from the
Office XP package. I installed it, keeping the Office 97
also. So not I have both 97 and XP on the same machine.

Anytime the merge is run, it now uses the Word
installation from XP and not from 97.

Now when I attempt to run the merge (that worked without
fail before) it will occasionally work, but most of the
time I get the following message from Access 97:

Run-time error '-21447417851 (80010105)
Method 'OpenOld' of object 'Documents' failed

Questions:
Can anyone shed any light on the what this error means
and what I can do to correct the problem. I currently
have a new application developed in Access 2002 that is
merging to Word 2002 with no problems.

Is there any way that I can programatically force the
merge to use Word 97. I have a feeling that that would
probably fix the problem.

Sorry for the long post, but any assistance and insite
would be appreciated.

Byron
 
V

Van T. Dinh

1. OpenOld is a hidden Method of the Documents object in
Word. Since it is hidden (more or less, being used
internally by Word only), there is no Help available. My
guess is that Word uses it to open documents in older Word
file formats.

2. Specify "Word.8" in your early biding / your code.
Word version 8 is Word 97. This way, you force Access to
use Word 97. Note that if you use this code where Word 97
is not installed, the code will error out rather than
using another version of Word.

HTH
Van T. Dinh
MVP (Access)
 
B

Byron

Van,

Thanks for the reply. I began to think that I was not
going to get anything back on this one.

Before getting your post, I changed my reference in my
project to reference Word 10 and that seemed to correct
the erroring out. Everything seems to be working now. I
can still use the Access 97 database to merge to Word 10
and all seem good.

Thanks again.

Byron
 

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