Access to Word using ODBC on Vista

G

Guest

Is there a known problem with ODBC connection from Access to Word mailmerge
on Vista? I have a database that opens Word using ODBC and sends data to
mailmerge fields. The code has been tested and running fine on other versions
of Windows (2000, XP...) but, I recently purchased a new laptop with Vista
Home Premium. When I click the button to open the Word file in Access (2003)
it hangs with the little circle spinning forever. I have to kill Word.

By the way, Word doesn't show up on the task bar at the bottom of the screen
nor is it in the Applications list in the task manager, as if it is not open
yet when the hang occurs. However it is running in the processes list in the
task manager. I have to kill the process there. Then Access is OK to continue
(I don't have to kill Access).

Any suggestions?

Beth
 
G

Guest

So.... What you are (NOT EXACTLY) saying is that Microsoft has put out this
Vista OS product that doesn't work with the legacy software and no one at
Microsoft knows anything about it!!! Is this correct?

Beth
 
J

j.mapson.nurick

Not necessarily. All it means is that no one who has read your message
and understands the question knows the answer. Very few of the people
who answer questions in these newsgroups are Microsoft employees.

Speaking for myself, I don't understand the question, because I didn't
know that Access could open Word via ODBC. Do you mean OLE?
 
D

Douglas J. Steele

<picky>
In actual fact, that code uses Automation to run Word from Access. The
Automation code has Word using ODBC to extract data from Access to use for
Mail Merge. You're not actually opening Word using ODBC: Word is opening
Access using ODBC.
</picky>

That having been said, I'm afraid I have no idea why it's not working for
you under Vista.
 
G

Guest

Ok, it is not the ODBC code that is the problem. It is the getobject function.

It is now placing the Word app in the applications list in the task manager,
but is not completing the open; if there is a datasource defined in the Word
file.
If I double click on the application title in the task manager, it will open
and continue on, but I hardly think that I can expect my clients to do a ctrl
alt delete and double click Word each time they want to create a report.

For some reason, ONLY on Vista, the getobject function hangs when it trys to
open a Word document with a datasource.
If I just open an ordinary doc that does Not contain merge
fields/datasource, the getobject function opens the doc just fine.

By the way I am using getobject instead of createobject because I am opening
specific existing documents/reports with mergefields defined.

Any ideas would be greatly appreciated.
Thanks,
Beth
 
P

pietlinden

Beth,

You could try using Albert's Kallal's "Super Easy Word Merge" code.
It dumps the data source info to a text file and then merges from
there. Handy if you want to use various databases with the same Word
file. Not sure it solves your problem as stated, but it's definitely
an option.

Okay, Albert's web page...
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

down the page, see "Super Easy Word Merge."
 
J

j.mapson.nurick

Like Doug I can't think why this should give problems under Vista.

Do these documents-with-datasources open all right if you double-click
them in Windows Explorer (or whatever Vista calls it)?

What happens if you modify the code so it first creates a Word
application object and then opens the document, e.g.

Dim oWord As Object, oDoc as Object
Set oWord = CreateObject("Word.Application")
Set oDoc = oWord.Documents.Open("D:\Folder\Filename.doc")
 
G

Guest

Thank you so much. I finally got a chance to try this and it works.
I don't know why Vista hangs on the getobject, but this worked just fine.

I didn't know the ...Documents.Open code. It's not really documented in the
VBA help file. I know just enough to be dangerous! ha!

Thank you again. And thanks to all others who responded to this question.

Beth
 

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