Hello,
I am working with a Word file that has tables linked to different ranges in Excel. Since the size of the table can change in Excel, I am looking for a way to update the ranges of all the linked tables in Word in an automated fashion instead of manually having to update them.
To clarify what I am referring to, the manual process for updating the linked table range is:
1) Open the "Links" window (clicking through "File->Info->Edit Links to Files" is one method)
2) Select a link that is to an Excel file (my "Type" is Excel.Sheet.8) and click "Change Source..."
3) Click on "Item..."
4) Select the Excel file that should be used (which is staying the same in my case)
5) Update the R1C1 style reference to the range in Excel to be used (ex. Sheet1!R1C1:R4C5 -> Sheet1!R1C1:R6C6)
My plan is to use VBA, but I do not know what objects are required to access and update the value changed in step 5 above. Can anyone please share VBA code to do this? I looked for example online with no luck and even tried the old trick of recording a macro which recorded nothing as predicted in this case.
FYI - Because of everything else that is going on in the Word document I am using, simply the deleting existing tables and then recreating them using links to the new range is not really a viable option.
Thank you very much,
Chris
I am working with a Word file that has tables linked to different ranges in Excel. Since the size of the table can change in Excel, I am looking for a way to update the ranges of all the linked tables in Word in an automated fashion instead of manually having to update them.
To clarify what I am referring to, the manual process for updating the linked table range is:
1) Open the "Links" window (clicking through "File->Info->Edit Links to Files" is one method)
2) Select a link that is to an Excel file (my "Type" is Excel.Sheet.8) and click "Change Source..."
3) Click on "Item..."
4) Select the Excel file that should be used (which is staying the same in my case)
5) Update the R1C1 style reference to the range in Excel to be used (ex. Sheet1!R1C1:R4C5 -> Sheet1!R1C1:R6C6)
My plan is to use VBA, but I do not know what objects are required to access and update the value changed in step 5 above. Can anyone please share VBA code to do this? I looked for example online with no luck and even tried the old trick of recording a macro which recorded nothing as predicted in this case.
FYI - Because of everything else that is going on in the Word document I am using, simply the deleting existing tables and then recreating them using links to the new range is not really a viable option.
Thank you very much,
Chris