GetActiveInstance() gives you the first instance in memory. may you have multiple instances in memory.
foreach(var item in Excel.Application.GetActiveInstances())
{
Console.WriteLine("Book: {0}", item.ActiveWorkbook);
}
(BTW: GetActiveInstances in NO 1.7.2 level a microsoft issue in the COM Running Object Table. make sure to use NO 1.7.2 or higher)
*Sebastian
foreach(var item in Excel.Application.GetActiveInstances())
{
Console.WriteLine("Book: {0}", item.ActiveWorkbook);
}
(BTW: GetActiveInstances in NO 1.7.2 level a microsoft issue in the COM Running Object Table. make sure to use NO 1.7.2 or higher)
*Sebastian