Auto update

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to link data from excel to auto update into a wrod dcoument
each time it is changed. i.e if a customer name was changed in excel it would
auto update the name every time it was mentioned in the word document.
 
One way to do this would be to link the text from Excel. In the following
example I have used the set field to assign a number of linked cells to a
bookmark called text to produce a name and address from data in an Excel
spreadsheet.

{ SET text "{ LINK Excel.Sheet.8 "D:\\path\filename.xls" "Sheet1!R2C6" \a
\t } { LINK Excel.Sheet.8 "D:\\path\filename.xls" "Sheet1!R2C1" \a \t }
{ LINK Excel.Sheet.8 "D:\\path\filename.xls" "Sheet1!R2C3" \a \t }
{ LINK Excel.Sheet.8 "D:\\path\filename.xls" "Sheet1!R2C4" \a \t }
{ LINK Excel.Sheet.8 "D:\\path\filename.xls" "Sheet1!R2C5" \a \t }
{ LINK Excel.Sheet.8 "D:\\path\filename.xls" Sheet1!R8C6 \a \t }"}

The parts after the filename
"Sheet1!R2C3"
Refer to the sheet the row and the column Thus cell B1 is R1C2 and R2C3 is
cell C3
The switches cause the links to be inserted as text and automatically
updated - though the concept of 'automatic' is a bit vague in this context
and I would suggest adding an update macro
http://www.gmayor.com/installing_macro.htm to a toolbar button to ensure
that the fields are indeed updated.

Wherever you want a bookmark inserted you can use a REF field. Thus here
{REF text \*charformat} would insert all those links configured in the set
field with the text parameters at the field location


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top