LoginSignup
0
0

More than 5 years have passed since last update.

[VBScript]Microsoft Office 各アプリケーションをセーフモードで起動する

Posted at

別にすぐ作れるような気はしますが、クラッシュしたときに一度セーフモードで起動すると安定します。特にExcelはそうです。
そのため、各VBScriptをあらかじめ作って保存しておくとクラッシュしたときにも安心です。特にパワーポイントの実行形式ファイルの名前は中途半端ですよね。:joy:

VBScriptで起動するとセーフモードかどうか聞いてこない

Wscript.Echo buf

各スクリプトは上記の部分を削ると、問い合わせなしで起動します。

Excel

vb.net
'https://support.microsoft.com/ja-jp/help/881075
Dim objShell,buf
Set objShell = CreateObject("WScript.Shell")
With objShell
buf = "Excel.exe /safe"
Wscript.Echo buf
.run buf , 1, false
End With
set objShell = Nothing
Wscript.Quit

WinWord

vb.net
'https://support.microsoft.com/ja-jp/help/881075
Dim objShell,buf
Set objShell = CreateObject("WScript.Shell")
With objShell
buf = "Winword.exe /safe"
Wscript.Echo buf
.run buf , 1, false
End With
set objShell = Nothing
Wscript.Quit

Outlook

vb.net
'https://support.microsoft.com/ja-jp/help/881075
Dim objShell,buf
Set objShell = CreateObject("WScript.Shell")
With objShell
buf = "Outlook.exe /safe"
Wscript.Echo buf
.run buf , 1, false
End With
set objShell = Nothing
Wscript.Quit

PowerPoint

vb.net
'https://support.microsoft.com/ja-jp/help/881075
Dim objShell,buf
Set objShell = CreateObject("WScript.Shell")
With objShell
buf = "Powerpnt.exe /safe"
Wscript.Echo buf
.run buf , 1, false
End With
set objShell = Nothing
Wscript.Quit

Microsoft Access

vb.net
'https://support.microsoft.com/ja-jp/help/881075
Dim objShell,buf
Set objShell = CreateObject("WScript.Shell")
With objShell
buf = "Msaccess.exe /safe"
Wscript.Echo buf
.run buf , 1, false
End With
set objShell = Nothing
Wscript.Quit
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0