Excel: Dynamic Path in Link to Word Document with Indirect-Funktion

Occasional Visitor

Hi,

I created a Word Template for an Invoice. Every created Document has an Ongoing Number (Test1, Test2 ...) 

In the excel, I pull data out of Word, via " =Word.Document.12|'path'!'!OLE_LINK5' and the Vlookup and give some Information out of a table back to the word document.

The linkage between the word document and the excel sheet works only with the direkt path to the word document. What I need now, is a variable for the path in another cell. 

E.G. in cell G1 is the new path which automatically updates itself with each new word document. 

I tried to use the Indirect funktion:

=Word.Document.12|'INDIRECT($G$1)'!'!OLE_LINK5'

But no matter if i put G1 in " ", write =indirect, or have no ' ' around the indirect, the funktion doesnt work. If i put the direct path in the funktion, it works.

Can someone help me fix my function, so the link between the excel sheet and the word documentswith dynamic paths will work?

 

 Thanks in advance

 

0 Replies