I need to go through hundreds of Excel files to find those that have macros, using a C# client.
I have tried using the code in the accepted answer here:
Using Interop.Excel to check if Excel file contains VBA Macros
However, this code opens the file first. Many of the files are opening pop up Windows and VBA error messages even after adding _appExcel.DisplayAlerts = false
Its also very slow. Is there a better way to go about this, ideally without opening the Excel file first?
I have looked for documentation on MSDN for Excel interop here: HasVBProject but there are no examples I can work with.