Dynamically link a MS Word document to a Report in Access 2010.

PeterLB

New member
Local time
Today, 15:58
Joined
Oct 9, 2012
Messages
7
I have developed a database using Access 2010. This is split into a Front End and a Back End.

In the same folder as the Back End I store a number of user modifiable files in either bitmap (.bmp) or MS Word (.doc to retain compatibility with older versions).

Unfortunately, the drive letter where the back end resides will change from location to location and I can't do anything about that.

I have set up a function that returns the location of the folder where the docs reside irrespective of the back end drive location, and this works perfectly with OLE linked pictures but not with OLE linked Word documents. User changes show correctly in Word document changes at locations with the original drive assignment but other locations show only the original doc contents even though they have been changed on the local back end location. - even if I delete the Source Item info on the report!!

An example of the code I am using for the Source Item is <GetBackEndPath() & "Footer.doc"> without the angled brackets of course, where GetBackEndPath() is a global variable storing the location of the documents folder ending with a back slash.

I have tried the above in the reports Source Doc property but Access won't accept this and says it isn't valid for this property.

Hope the above makes sense and help with this is greatly appreciated.
 
G'd afternoon Peter,
Have you tried with UNC paths like \\server\share\folder\file.doc ?
 
Hi Estuardo

Yes, one of the things I tried. Access doesn't allow me to enter the UNC Path in the Unbound Objects Source Doc property - I get the error 'The setting you entered for this property isn't valid'.

I also tried the UNC in the Unbound Objects Source Item, but whilst Access 2010 accepts this, when I run the database at a different location, (different drive letter for the back end but exactly the same path \\MyDB\CustomerDocs\Footer.doc), access 'remembers' the original Footer.doc content and does not pick up any changes made by the customer; though it works just fine on the PC/Network I created it on.

Strange that Access 'remembers' the original content even though it is most definitely linked and not embedded, even if I delete the file Footer.doc at the remote site.
 

Users who are viewing this thread

Back
Top Bottom