I have a solution containing an VSTO Excel AddIn project and an VSTO Excel Template project. Is there any design pattern (or hack) that can allow the ThisAddIn instance to access properties and methods of the ThisWorkboo开发者_如何学运维k instance, and vice versa?
Also I should note that I'm using VS 2008, VSTO 2005SE, and the target Office version is 2003.
Addins are workbooks, as far as Excel is concerned. So if you reference thisworkbook in the addin code you are referring to the addin.
You can always refer to other excel files but you generally have to know the name of the file (or be able to derive based on which workbooks are open).
精彩评论