{"id":12256,"date":"2019-10-17T12:00:05","date_gmt":"2019-10-17T03:00:05","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=12256"},"modified":"2019-10-17T14:00:49","modified_gmt":"2019-10-17T05:00:49","slug":"office%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e3%80%8c%e6%9c%80%e8%bf%91%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%80%8d","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=12256","title":{"rendered":"Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u300c\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u300d\u3092\u524a\u9664\u3059\u308bVBScript"},"content":{"rendered":"<p>Word\u3084Excel\u7b49\u306eOffice\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u4e0b\u8a18\u30b5\u30a4\u30c8\u306b\u3042\u308b\u901a\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u306e\u5c65\u6b74\u304c\u30ec\u30b8\u30b9\u30c8\u30ea\u306b\u8a18\u9332\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"linkcard\"><div class=\"lkc-external-wrap\"><a class=\"lkc-link no_icon\" href=\"http:\/\/office-qa.com\/Word\/wd421.htm\" target=\"_blank\" rel=\"external nofollow noopener\"><div class=\"lkc-card\"><div class=\"lkc-info\"><div class=\"lkc-favicon\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.google.com\/s2\/favicons?domain=office-qa.com\" alt=\"\" width=\"16\" height=\"16\" \/><\/div><div class=\"lkc-domain\">office-qa.com<\/div><\/div><div class=\"lkc-content\"><figure class=\"lkc-thumbnail\"><img decoding=\"async\" class=\"lkc-thumbnail-img\" src=\"https:\/\/s.wordpress.com\/mshots\/v1\/http%3A%2F%2Foffice-qa.com%2FWord%2Fwd421.htm?w=100\" width=\"100px\" height=\"108px\" alt=\"\" \/><\/figure><div class=\"lkc-title\">Word2016\uff1a\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u65b9\u6cd5 \u2212\u6559\u3048\u3066\uff01HELPDESK<\/div><div class=\"lkc-url\" title=\"http:\/\/office-qa.com\/Word\/wd421.htm\">http:\/\/office-qa.com\/Word\/wd421.htm<\/div><div class=\"lkc-excerpt\">\u30d5\u30a1\u30a4\u30eb\u30bf\u30d6\u3084\u300c\u958b\u304f\u300d\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u306e\u5c65\u6b74\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u524a\u9664\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/div><\/div><div class=\"clear\"><\/div><\/div><\/a><\/div><\/div>\n<p>Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u4eba\u524d\u3067\u30d7\u30ec\u30bc\u30f3\u3092\u3059\u308b\u3068\u304d\u7b49\u3001\u5c65\u6b74\u3092\u8868\u793a\u3057\u305f\u304f\u306a\u3044\u6642\u306b\u3001\u3044\u3061\u3044\u3061\u624b\u4f5c\u696d\u3067\u30ec\u30b8\u30b9\u30c8\u30ea\u3092\u7de8\u96c6\u3059\u308b\u306e\u306f\u9762\u5012\u306a\u306e\u3067\u3001\u6240\u8b02<span style=\"color: #ff0000; font-weight: bold;\">\u201c\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u201d<\/span>\u3092\u4e00\u62ec\u3067\u524a\u9664\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nDim app, v\r\n\r\n'Office\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97\r\nOn Error Resume Next\r\nSet app = CreateObject(&quot;Excel.Application&quot;)\r\nOn Error GoTo 0\r\nIf IsEmpty(app) Then\r\n  WScript.Echo &quot;Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002&quot;\r\n  Wscript.Quit\r\nEnd If\r\nv = app.Version\r\napp.Quit\r\nSet app = Nothing\r\n\r\nClearOfficeMRU &quot;Software\\Microsoft\\Office\\&quot; &amp; v &amp; &quot;\\&quot;\r\nWScript.Echo &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot;\r\n\r\nPrivate Sub ClearOfficeMRU(ByVal SubKeyName)\r\n'\u5168Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u300c\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u300d\u3092\u524a\u9664\u3059\u308b\r\n  Dim shell, reg\r\n  Dim keys, key\r\n  Dim subkeys, subkey\r\n  Dim names, types\r\n  Dim i\r\n  Const HKEY_CURRENT_USER = &amp;H80000001\r\n  \r\n  Set shell = CreateObject(&quot;WScript.Shell&quot;)\r\n  Set reg = CreateObject(&quot;WbemScripting.SWbemLocator&quot;) _\r\n            .ConnectServer(, &quot;root\\default&quot;).Get(&quot;StdRegProv&quot;)\r\n  reg.EnumKey HKEY_CURRENT_USER, SubKeyName, keys\r\n  If Not IsNull(keys) Then\r\n    For Each key In keys\r\n      Select Case LCase(key)\r\n        Case &quot;file mru&quot;, &quot;place mru&quot;, &quot;user mru&quot;\r\n          reg.EnumValues HKEY_CURRENT_USER, SubKeyName &amp; key, names, types\r\n          If Not IsNull(names) Then\r\n            If UBound(names) &gt; 1 Then\r\n              For i = LBound(names) To UBound(names)\r\n                If InStr(LCase(names(i)), &quot;metadata&quot;) &lt; 1 Then\r\n                  If InStr(LCase(names(i)), &quot;item&quot;) &gt; 0 Then\r\n                    'WScript.Echo shell.RegRead(&quot;HKEY_CURRENT_USER\\&quot; &amp; SubKeyName &amp; key &amp; &quot;\\&quot; &amp; names(i)) '\u78ba\u8a8d\u7528\r\n                    shell.RegDelete &quot;HKEY_CURRENT_USER\\&quot; &amp; SubKeyName &amp; key &amp; &quot;\\&quot; &amp; names(i)\r\n                  End If\r\n                End If\r\n              Next\r\n            Else\r\n              reg.EnumKey HKEY_CURRENT_USER, SubKeyName &amp; key, subkeys\r\n              If Not IsNull(subkeys) Then\r\n                For Each subkey In subkeys\r\n                  ClearOfficeMRU SubKeyName &amp; key &amp; &quot;\\&quot; &amp; subkey &amp; &quot;\\&quot;\r\n                Next\r\n              End If\r\n            End If\r\n          End If\r\n        Case Else\r\n          ClearOfficeMRU SubKeyName &amp; key &amp; &quot;\\&quot;\r\n      End Select\r\n    Next\r\n  End If\r\nEnd Sub<\/pre>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<p>\u4ed5\u7d44\u307f\u306f\u975e\u5e38\u306b\u5358\u7d14\u3067\u3001\u4e0b\u8a18\u306e\u30ad\u30fc\u4ee5\u4e0b\u306b\u3042\u308b\u300c<span style=\"color: #ff0000; font-weight: bold;\">File MRU<\/span>\u300d\u300c<span style=\"color: #ff0000; font-weight: bold;\">User MRU<\/span>\u300d\u300c<span style=\"color: #ff0000; font-weight: bold;\">Place MRU<\/span>\u300d\u30ad\u30fc\u3092\u63a2\u3057\u3001\u5c65\u6b74\u3068\u3057\u3066\u6b8b\u3063\u3066\u3044\u308b\u5024(Item*)\u3092\u524a\u9664\u3059\u308b\u51e6\u7406\u3092\u518d\u5e30\u7684\u306b\u884c\u3063\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4e0b\u8a18\u30ad\u30fc\u4ee5\u4e0b\u306b\u5bfe\u3057\u3066\u9806\u6b21\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u3059\u3079\u3066\u306e\u51e6\u7406\u3092\u7d42\u3048\u308b\u306e\u306b\u591a\u5c11\u306e\u6642\u9593\u306f\u639b\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\(Office\u306e\u30d0\u30fc\u30b8\u30e7\u30f3)\\(Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3)\\<\/pre>\n<p>\u307e\u305f\u3001\u52d5\u4f5c\u78ba\u8a8d\u306f\u884c\u3063\u3066\u3044\u308b\u3082\u306e\u306e\u3001\u4e0a\u8a18\u30b9\u30af\u30ea\u30d7\u30c8\u306f<span style=\"color: #ff0000; font-weight: bold;\">\u30ec\u30b8\u30b9\u30c8\u30ea\u306e\u7de8\u96c6\u3092\u884c\u3046\u3082\u306e\u3067\u3059\u306e\u3067\u3001\u5b9f\u884c\u306f\u81ea\u5df1\u8cac\u4efb\u3067<\/span>\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Word\u3084Excel\u7b49\u306eOffice\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u4e0b\u8a18\u30b5\u30a4\u30c8\u306b\u3042\u308b\u901a\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3084\u30d5\u30a9\u30eb\u30c0\u306e\u5c65\u6b74\u304c\u30ec\u30b8\u30b9\u30c8\u30ea\u306b\u8a18\u9332\u3055\u308c\u307e\u3059\u3002 Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u4eba\u524d\u3067\u30d7\u30ec\u30bc\u30f3\u3092\u3059\u308b\u3068\u304d\u7b49\u3001\u5c65\u6b74\u3092\u8868\u793a\u3057\u305f\u304f\u306a\u3044\u6642 [&hellip;]","protected":false},"author":1,"featured_media":7132,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[Office\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u300c\u6700\u8fd1\u4f7f\u7528\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u300d\u3092\u524a\u9664\u3059\u308bVBScript]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48,49,58,6],"tags":[],"class_list":["post-12256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","category-powerpoint","category-vbs"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-VBScript.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-3bG","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12256"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12256\/revisions"}],"predecessor-version":[{"id":12257,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12256\/revisions\/12257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7132"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}