开发者

Making ThisWorkbook talk with ThisAddIn

开发者 https://www.devze.com 2022-12-25 10:46 出处:网络
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

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号