Question

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 ThisWorkbook instance, and vice versa?

Also I should note that I'm using VS 2008, VSTO 2005SE, and the target Office version is 2003.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top