Running an Excel Macro via C#: Run a macro from one workbook on another?
I am looking to run a macro, let's call it Macro01 from WorkSheet01 on WorkSheet02. Using Microsoft.Office.Interop.Excel Namespace I have opened a WorkSheet01. public void Main_CodedStep() { // Object for missing (or optional) arguments. object oMissing = System.Reflection.Missing.Value; // Create an instance of Microsoft Excel Excel.ApplicationClass oExcel = new Excel.ApplicationClass(); // Make it visible oExcel.Visible = true; // Open Worksheet01.xlsm Excel.Workbooks oBooks = oExcel.Workbooks; Excel._Workbook oBook = null; oBook = oBooks.Open("C:\\Users\\Admin\\Documents\\Worksheet01.xlsm",