I have Excel AddIn and I need to pass Excel Main Window to a certain function as a parent. So, at ThisAddin_Startup I try
public static Excel.Window ExcelActiveWindow { get; set; }
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
ExcelActiveWindow = this.Application.ActiveWindow;
}
However, at this point it is still null... So how can I get it? (Normally I use Add-In Express that has no problems like that)