含んでいるフォルダを開く

概要編集

開いているドキュメントがあるフォルダをエクスプローラで表示します。

VisualStudio の「含んでいるフォルダを開く」機能の模倣です。

ソースコード編集

#title = "含んでいるフォルダを開く"

// -----------------------------------------------------------------------------
// 開いているドキュメントのフォルダを開きます。
//
// Copyright (c) ks. All Rights Reserved.
// www:    http://merysmacro.seesaa.net/
// -----------------------------------------------------------------------------

var doc = window.Editor.ActiveDocument;
if (doc.Path) {
	var shell = new ActiveXObject("WScript.Shell");
	shell.Run("rundll32.exe url.dll FileProtocolHandler \"" + doc.Path + "\"");
}
スポンサーリンク