Linked Values from Excel to word not showing

Hanimlat

New Member
Joined
Jul 27, 2020
Messages
1
Hello,

I have an Excel table with some calculations.
i'm linking some of the cells to a Word document with "paste special->paste link".
I also have a Macro in the excel file that hides some rows upon request.
the problem is that when the rows are hidden the values from the excel
don't appear in the word document.
any suggestions?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I presume you are saying that if the Excel file (as saved on disk) has some rows hidden, they won't appear in the Word document - but you want all of them

There's no way to tell Word to change the way it reads the linked file, but perhaps you can do this instead. Put some code in the Excel workbook close event to show all the rows before closing, then the saved file on disk will always have all rows showing, and the Word document will always load all of them

In the VBA editor (Alt F11), doubleclick on the ThisWorkbook item in the list at left, then paste this code in

VBA Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
  Sheets("XXXX").UsedRange.EntireRow.Hidden=False 'where xxxx is the name of the sheet
  ThisWorkbook.Save
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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