Access generate a word.application problems

G

Guest

Hi,
I had an annoying problems when try to write data from access database into
the word document.

I tested in the Windows XP and office 2000 machine. I reference the word dll
to msword9.olb. Somehow the following sentence does not work properply.


Dim objWord As Word.Application
Dim objDoc As Word.Document
Set objWord = New Word.Application

When I debug it, I found that objWord is nothing after new it. But I can
find the winword.exe in the task list. I do not know why it happens and how
to fix the problem.

Anybody can give me some advice? Thanks in advance.
 
G

Guest

Hi Van,

I have tried this as well but the same result. Yesterday I used another mde
file to test, it can generate the word file again. Quite confused me.

Thanks.

Rebekah
 
V

Van T. Dinh

Have you checked the References collection of the database amd made sure
that none of the References is marked as MISSING?
 
V

Van T. Dinh

I meant the References Collection of the database vis VBE Tools / References
.... Sometimes the file exists on your PC but your database can't find it and
the Reference should be "Microsoft Word 9.0 Object Library". Check the
entries for other References also.

* Try Compact & Repair your database.

* Try creating a quick and dirty test database and then few line of codes
(like you posted) and see if you have the same problem.

If you do, you probably need to repair or re-install Access / Office.
 

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