W
ward
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
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