Links to Word doc - automatically updating filename?

Bobblybook

New Member
Joined
Mar 17, 2011
Messages
3
Hi everyone,
I've got a pair of files (xls + doc) where fields & graphs are linked into the word doc. The problem is I have the template files, but if I copy them to use for a report, the fields in the new word doc still link to the template file rather than it's own version of the spreadsheet.

The word doc and excel files will have the same name apart from the file extension... would it be possible to make the links in word dynamic? I haven't really explained it that well.. here's an example:

Currently I have template.xls and template.doc. If I make a copy of both and rename them reportA.xls and reportA.doc, the fields in reportA.doc still reference template.xls rather than reportA.xls.
Would it be possible to make links within the word doc such as [own filename without .doc].xls rather than just a static link to a specific file? I will have reportB, reportC etc. and I need each one to reference it's own excel spreadsheet.

If not is there any other way of dealing with this problem?

Thanks,
Adam
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I can't seem to find a way to edit my post unfortunately, but I have found a command in excel which returns the filename of the excel file: =cell("filename")
I basically need this functionality in word if possible in order to set the references to the linked charts/objects to this filename.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,822
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top