开发者

How do I avoid Word 2007 Safe-mode?

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 properl开发者_开发问答y.

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?


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.


I have the same problem with powerpoint. We run a theatre that does slide shows in between shows. If powerpoint somehow crashes or closes uncleanly, you are prompted to start in safe mode. What happens is that the "do you want to start powerpoint in safe mode" comes up and requires user intervention to fix. I would like to disable this "feature" or safe mode entirely. The closest I have come is the following fix, which I have now implemented but I do not know if it will actually prevent it or not until another crash (which can take months to happen - thankfully). Seems promising though!

  1. Open up a blank Word document on your computer.
  2. Click on the circular icon in the upper left-hand corner. Select "Word Options" from the menu.
  3. Click on "Trust Center" on the left-hand side of the menu.
  4. Select "Trust Center Settings."
  5. Select the "Active X Settings" and uncheck the box for "Safe Mode." This will disable the feature in all Office programs.
  6. Hit "OK" to save your changes and close the Microsoft Word document.


Most likely, but you must look to fix the problem at the level of diagnosis, not fire-fight the symptoms away.

  • Look into the code which utilises Word

  • Localise the piece of code which could cause failure

  • Find particular solutions to the found problem

  • Correct the issue

Don't look to 'auto-click' the dialog away or any other such flakiness, this is a hack.

The code in question would be useful, if not invaluable to providing real help.


I have similar problem dealing with PowerPoint in .Net

the safe-mode message box will show up when I launch it from my program after PowerPoint crashed, which stopped my automatically process

after some investigation into the registry, deleting this

HKCU\Software\Microsoft\Office\15.0\PowerPoint\Resiliency (change the Product and Version)

before starting the Office program will avoid the Safe-mode

(This registry key stores the info of last opened file, by deleting this, PowerPoint won't know it was crashed, so it opens normally)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜