![]() |
Linking Embedded Sheets
Hi,
I need to embed several worksheets into a word document. My problem is that the sheets need to be linked to each other. Can anyone point me in the right direction. I've done my fair share of vba in excel and have done a lot of expert level vba programming in other office apps so if this requires vb that would be great too. Thanks for your time and ideas. Pachydermitis |
Linking Embedded Sheets
The easiest solution is to Link the files rather than Embed them, then you
can maintain their formulae to eachother. Once embedded they lose the notion of a "file" and exist as a separate entity. In theory you could use Excel/VBA code to return the document they are in, with: Dim Cont as Object Set Cont=ThisWorkbook.Container but I can never get this to work from Excel in Word, although word in Excel functions as expected. Also the Word/VBA help is not much better. <From Help Container Property Example This example displays the name of the container application for the first shape in the active document. For the example to work, this shape must be an OLE object. Msgbox ActiveDocument.Shapes(1).OLEFormat.Object.Containe r.Name </From Help This always fails also. NickHK "Pachydermitis" wrote in message oups.com... Hi, I need to embed several worksheets into a word document. My problem is that the sheets need to be linked to each other. Can anyone point me in the right direction. I've done my fair share of vba in excel and have done a lot of expert level vba programming in other office apps so if this requires vb that would be great too. Thanks for your time and ideas. Pachydermitis |
Linking Embedded Sheets
Thanks for the suggestions. None of my attempts have been sucessful as
of yet. I am not sure I know what you mean by link rather than embed. I have a word doc that is some 80 pages long that needs excel sheets in the middle of it. These sheets need to be able to reference each other. Linking them would be perfect if as long as I can open word and change a cell, having it reflect elsewhere in anther sheet in the document. Is there some way to embed linked sheets or something? Thank you once again NickHK wrote: The easiest solution is to Link the files rather than Embed them, then you can maintain their formulae to eachother. Once embedded they lose the notion of a "file" and exist as a separate entity. In theory you could use Excel/VBA code to return the document they are in, with: Dim Cont as Object Set Cont=ThisWorkbook.Container but I can never get this to work from Excel in Word, although word in Excel functions as expected. Also the Word/VBA help is not much better. <From Help Container Property Example This example displays the name of the container application for the first shape in the active document. For the example to work, this shape must be an OLE object. Msgbox ActiveDocument.Shapes(1).OLEFormat.Object.Containe r.Name </From Help This always fails also. NickHK "Pachydermitis" wrote in message oups.com... Hi, I need to embed several worksheets into a word document. My problem is that the sheets need to be linked to each other. Can anyone point me in the right direction. I've done my fair share of vba in excel and have done a lot of expert level vba programming in other office apps so if this requires vb that would be great too. Thanks for your time and ideas. Pachydermitis |
Linking Embedded Sheets
OK, I replied too quickly, I found what you were talking about
regarding linking the sheets. This may work for me, I will play with it for a while. Thank you for your help Pachydermitis wrote: Thanks for the suggestions. None of my attempts have been sucessful as of yet. I am not sure I know what you mean by link rather than embed. I have a word doc that is some 80 pages long that needs excel sheets in the middle of it. These sheets need to be able to reference each other. Linking them would be perfect if as long as I can open word and change a cell, having it reflect elsewhere in anther sheet in the document. Is there some way to embed linked sheets or something? Thank you once again NickHK wrote: The easiest solution is to Link the files rather than Embed them, then you can maintain their formulae to eachother. Once embedded they lose the notion of a "file" and exist as a separate entity. In theory you could use Excel/VBA code to return the document they are in, with: Dim Cont as Object Set Cont=ThisWorkbook.Container but I can never get this to work from Excel in Word, although word in Excel functions as expected. Also the Word/VBA help is not much better. <From Help Container Property Example This example displays the name of the container application for the first shape in the active document. For the example to work, this shape must be an OLE object. Msgbox ActiveDocument.Shapes(1).OLEFormat.Object.Containe r.Name </From Help This always fails also. NickHK "Pachydermitis" wrote in message oups.com... Hi, I need to embed several worksheets into a word document. My problem is that the sheets need to be linked to each other. Can anyone point me in the right direction. I've done my fair share of vba in excel and have done a lot of expert level vba programming in other office apps so if this requires vb that would be great too. Thanks for your time and ideas. Pachydermitis |
All times are GMT +1. The time now is 11:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com