Ash_stack
Ash_stack

Reputation: 15

Safe mode in Excel - how to trigger this?

I've written a few vb.net programs which some of my colleagues have an error with since going to Office 365. They sometimes get a remote procedure call failed message when the program tries to do something in Excel automation.

The problem is the 'Do you want to open in safe mode?' prompt that sometimes appears.

I dont know what is causing this, it could be an external issue, but the answer seems to be to just enclose the call in a try/end try and if it doesn't work the first time, try it again.

So what's my problem? - I want to test the repeat call works, so I need be able to force Excel to go into safe mode for testing purposes.

I don't want it to call it in safe mode every time (ie via command line switch), because I want to simulate what happens in real life where the 2nd call resolves the problem.

How do I go about this? - I've tried ending the Excel task in task manager at various stages but it doesn't trigger safe mode on the next open.

Any suggestions would be much appreciated!

Upvotes: 0

Views: 277

Answers (1)

p._phidot_
p._phidot_

Reputation: 1952

I think you are looking for this command :

excel /s

ref : https://www.howtogeek.com/740291/how-and-why-to-start-microsoft-excel-from-the-command-prompt/

Please share if it works/not in your setup.

Upvotes: 0

Related Questions