Reply
 
Thread Tools Display Modes
  #1   Report Post  
 
Posts: n/a
Default Document opened from Access loses data settings

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

  #2   Report Post  
Cindy Meister
 
Posts: n/a
Default

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

" wrote:

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


  #3   Report Post  
 
Posts: n/a
Default

Thanks a lot Cindy, this solved my problem!

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Merge Fields via VB.NET ben Mailmerge 5 June 21st 05 05:43 PM
Mail Merge - Parameter prompts twice... TL Mailmerge 6 June 17th 05 02:58 PM
How do keep blank lines when merging a document with the data and. ftroop Mailmerge 1 March 30th 05 04:27 PM
exporting accress reports into word marc Microsoft Word Help 8 December 29th 04 04:40 PM
Can I access a "corrupted" document from a disk? basquo Microsoft Word Help 1 December 7th 04 08:17 PM


All times are GMT +1. The time now is 01:09 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"