Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I avoid Word 2007 Safe-mode?

Tags:

c#

ms-word

I am debugging a C# program that calls Word 2007 for rendering of some office files. It all works well as long as Word starts up and shuts down properly.

In the few instances where it wasn't, there is a pop-up message from Word the next time. It basically says that it wasn't started properly last time and then asks if I would like to start it in Safe-mode. Is there any way of avoiding this popup message?

like image 996
Kasper Hansen Avatar asked Dec 08 '25 06:12

Kasper Hansen


1 Answers

There are a few approaches here:

  1. Do you really need to avoid safe mode, or just the dialog? If you can start Word with the /safe option then it will always be in safe mode and shouldn't ask you.

  2. Do you know what causes safe mode? Maybe starting Word with the /a option to disable add-ins (assuming you're not using any) would prevent the cause of the crashing in the first place.

  3. See if you can figure out what causes Word to think it should open in safe mode. There has to be a file or registry entry that trips it up. You can use Process Monitor to see what files and registry entries it looks at, and see which ones are different between traces from a regular startup and one where it asks for safe mode. Then make sure that condition doesn't exist just prior to opening Word.

See http://support.microsoft.com/kb/210565 for a list of command line options for Word.

like image 163
Gabe Avatar answered Dec 09 '25 19:12

Gabe