2

I'm building an addin for Excel using ExcelDna and NetOffice.

An addin in Excel can either be installed and included in every Excel session or it can be opened adhoc by just opening the xll file.

Is there any way for me to programmatically detect in my addin code whether it was opened adhoc or if it was installed?

jww
  • 97,681
  • 90
  • 411
  • 885
Niels Bosma
  • 11,758
  • 29
  • 89
  • 148

1 Answers1

0

Perhaps the directory returned via System.Reflection.Assembly.GetExecutingAssembly().Location could tell you the answer, based on the installation folder.

Mozzis
  • 421
  • 4
  • 7