Document opened from Access loses data settings

C

chrisderoover

Hello,
I have an Access application that opens a Word file which is a main
merge document. After upgrading to Word 2003, I notice that the Word
document loses the reference to the data file (an Access 2003 db) when
it is opened from within the db. How do I avoid to have to browse each
time to the db when opening the merge file?
BTW there is no problem if I open the merge file directly in Word.
This is the code snippet I use to open the Word file in Access:

Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Open strFactuur 'this variable contains path to the
word file

tia,
Chris
 
G

Guest

Hi Chris

check out this KB article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765
http://support.microsoft.com?kbid=825765

To summarize:
- this is expected behavior
- you need to either create the Registry key described
- or your automation code needs to link in the data source file once the
document is opened
 

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