CodePlexProject Hosting for Open Source Software
static void Main()
* NetOffice gives you as additional service a debug console.
* Essential NetOffice system steps and any occured exception related with
* your office application(or NetOffice himself maybe) are stored here. * if an error occureed and you need help, please use the NetOffice discussion board: * http://netoffice.codeplex.com/discussions
* describe your problem and post the content of the DebugConsole as below your message.
* the following infos are also helpful: operating system 32 or 64 bit, * office version 32 or 64 bit, assembly runs as administrator or not
* the following options are available
* ConsoleMode.None = Console is deactivated (default)
* ConsoleMode.Console = redirect all messages to System.Console* ConsoleMode.Trace = redirect all messages to System.Diagnostics.Trace
* ConsoleMode.MemoryList = keep all messages in memory. * use DebugConsole.Messages and * DebugConsole.ClearMessagesList() with these option * ConsoleMode.LogFile = writes all messages immediately to a file. * you have to set DebugConsole.FileName before use
Excel.Application application = null;
// activate the DebugConsole. the default value is: ConsoleMode.None
DebugConsole.Mode = ConsoleMode.MemoryList;
// create excel instance
application = new NetOffice.ExcelApi.Application();
application.DisplayAlerts = false;
// we open a non existing file to produce an error
Console.WriteLine("An error is occured. NetOffice DebugConsole content below:");
foreach (string item in DebugConsole.Messages)
// quit and dispose
Last edited May 14, 2012 at 4:05 AM by SebastianDotNet, version 6
This product is simply amazing. Sebastian has picked up where Microsoft left off many years ago by creating a product that facilitat... (more)
This project is simply awesome!!!
I was able to convert an Outlook Add-in from VSTO to NetOffice within 1 day using Visual Studio 20... (more)
Sign in to join this project.