View Single Post
 
Old 10-28-2009, 08:45 AM
vsempoux vsempoux is offline Windows XP Office 2003
Novice
 
Join Date: Oct 2009
Posts: 7
vsempoux is on a distinguished road
Default Automatic find replace after selection in dropdown

Hello all,

I would like to accomplish the following:

- i open my word document
- on page 1 and two i have a number of dropdownboxes
- on the last page i have a table with 2 columns
(col1 = code, col2 = description)
example :
col1 col2
-------------------
<TR1> Mr
<TR2> Smith
<TR3> John
.......

when in one of my dropdownboxes i select the following text:

"Dear <TR1> <TR2>, we thank you for your trust in our company."

it is automatically inserted in a bookmark just under the dropdown.

What i would like next in that automated step is that a script checks the
content of that text and if it finds a value (like <TR1>) that is
contained in col1 of my table, automatically replaces it with the value that
is in col2.

So the script should run through all the <> values it finds in the selected
text from the dropdownbox and compare it with the values in col1 of my table. When it finds the correspondant value, it should be replaced with the value in col2.

thanks already for your help.

Vincent
Reply With Quote