Word VBA >> updatable link to MS Access field ?

by ward » Thu, 29 Jul 2004 18:20:58 GMT

Hello,

BRIEF DESCRIPTION:
How can I insert in Word a 'dynamic' link to a particular
field in an Access Database?

LONG DESCRIPTION:
We're faced with the following issue for a big
documentation project.

Basically, the project would consist of maintance
documentation which would be stored in:
- several hundreds of Word files, containing descriptions,
removal procedures, etc.
- an Access database containing (among other things) a
table with 2 fields: ToolNumber and ToolDescription.

In the Word documents, we would like to insert one or more
tool numbers and tool descriptions, as retrieved from the
database. For example, through some Word VBA form, the
author would selected tool number "T103" and at the
current position in his document this tool number "T103"
and corresponding description "Torque wrench M=30 Nm"
would be inserted.

The problem is that we want this to be 'dynamic': if the
description of the tool is changed in the Database, then
the description should change in the Word document as well.
Either upon opening of the Word document or after some
kind of command (e.g. F9 or VBA macro, or ...)

My idea is upon inserting in Word to put the tool number
text and description text in a specific style
(e.g. "ToolStyle") and write a Word VBA application that
will:
- scan the document for this style,
- look up the toolnumber in the Access Database,
- retrieve the (new) description,
- and (if changed) replace the old description in Word.

I'm not sure this is the best possible solution.

Does anybody has some easier or/and more bulletproof
or/and non-VBA solutions, that will do the job?
Maybe a special Word field exist to link Database fields?

Really appreciating any thoughts and ideas,
Ward


Word VBA >> updatable link to MS Access field ?

by Chad DeMeyer » Fri, 30 Jul 2004 00:13:05 GMT


Ward,

Please refer to the article at
http://office.microsoft.com/assistance/preview.aspx?AssetID=HP051862061033&CTT=4&Origin=CH061047251033.

Regards,
Chad









Similar Threads

1. Linking a MS Word field to MS Access table

I'd like to find out how to link the data entered into a 
MS Word form field to automatically be entered into a 
respective MS access field?  So when you fill out a simple 
form in Word, certain inputs woould be automatically 
entered into the matching fields in Access.  Thanks for 
your help.

2. ASP and MS Access: Recodset not updatable

3. How to link fields in MS word document to Access database

Anyone have experience in linking fields in an MS Word document to an 
access database?

What I am considering doing is taking an existing fill-in-the fields 
word document, for which I cannot now save the data, and allow it to be 
opened with no data, have the fields filled in and then save the data in 
an Access database.  I also want to later select the document (from a 
file in the database), open the word document and populate the fields 
from the database.  Of course if there are then any updates I want to 
put them back into the database.

Workable?

Anyone with sample code?

Bob Alston

4. Access: Recordset is not updatable - Microsoft Office

5. Error when trying to access MS Access database with Linked Tab

Hi,

I am using Anonymous access and Forms authentication. As far as I can see 
the configuration on the local machine is identical as on the server. The 
only difference is Win2K/IIS 5.0, Win XP/IIS 5.1 and the fact that the 
database i using linked tables from a network drive mapped from our 
fileserver.

Pl

6. Error when trying to access MS Access database with Linked Tables

7. STORING MS EXCEL, MS WORD, and PDF FILES in MS ACCESS NOTES FIELD

I have a database set up with Construction Equipment for a large construction 
fleet.  Each piece of equipment is assigned an equipment number and that is 
how it is stored in MS ACCESS.  If you want to know something about a piece 
of equipment you pull it up by equipment number.  I have alot of MS WORD 
Documents, MS EXCEL, and PDF files that have information about each piece of 
machinery and I would like to store them under the equipment number.  For 
each piece of equipment we have a"NOTES FIELD", I have tried copying and 
pasting the documents to the "NOTES FIELD" however it will not allow me to 
paste the documents in that field.  Is there a way to store these documents 
under the equipment # set-up we have in MS ACCESS?  What type of field do we 
need to have?

8. link text field from Word to Access field in database - Word VBA