I have a C# Winforms program that opens an excel document with the code below. It works great but what I can not figure out how to do, is to turn off ALL menu s and toolbars.
The excel version I am using right now is 2003... But I will be upgrading to 2010 in the near future. Any ideas?
//top of source...
using Excel = Microsoft.Office.Interop.Excel;
// Code inside a function...
// Get report and display it on the screen.
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
object misValue = System.Reflection.Missing.Value;
xlApp = new Excel.ApplicationClass();
xlWorkBook = xlApp.Workbooks.Open(strFileName, 0, true, 5, "", "", true,Excel.XlPlatform.xlWindows, " ", false, false, 0, true, 1, 0);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
xlApp.Visible = true;
xlApp.DisplayFullScreen = true;
// Display the Document and then Sleep.
System.Threading.Thread.Sleep(timeToShowMilliseconds);
// Close the Excel report
xlWorkBook.Close(false, misValue, misValue);
xlApp.Quit();
releaseObject(xlWorkSheet);
releaseObject(xlWorkBook);
releaseObject(xlApp);