{"id":1221,"date":"2012-01-30T13:47:12","date_gmt":"2012-01-30T04:47:12","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=1221"},"modified":"2013-08-29T14:52:06","modified_gmt":"2013-08-29T05:52:06","slug":"%e3%83%9e%e3%82%af%e3%83%ad%e3%81%ab%e5%89%b2%e3%82%8a%e5%bd%93%e3%81%a6%e3%81%9f%e3%82%b7%e3%83%a7%e3%83%bc%e3%83%88%e3%82%ab%e3%83%83%e3%83%88%e3%82%ad%e3%83%bc%e3%82%92csv%e3%83%95%e3%82%a1","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=1221","title":{"rendered":"\u30de\u30af\u30ed\u306b\u5272\u308a\u5f53\u3066\u305f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30ad\u30fc\u3092CSV\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3059\u308bWord\u30de\u30af\u30ed"},"content":{"rendered":"<p>Word MVP\u306e<a href=\"http:\/\/ameblo.jp\/gidgeerock\/\" title=\"\u307f\u3093\u306a\u306e\u30ef\u30fc\u30c9\u30de\u30af\u30ed\" target=\"_blank\">\u65b0\u7530\u3055\u3093<\/a>\u304c\u66f8\u304b\u308c\u305f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u898b\u3066\u601d\u3044\u3064\u3044\u305f\u30de\u30af\u30ed\u3067\u3059\u3002<\/p>\n<p>\u30fb<a href=\"http:\/\/ameblo.jp\/gidgeerock\/entry-11147122015.html\" title=\"\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed\" target=\"_blank\">\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed<\/a><br \/>\n\u30fb<a href=\"http:\/\/ameblo.jp\/gidgeerock\/entry-11147699749.html\" title=\"\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed\uff08\u305d\u306e\uff12\uff09\" target=\"_blank\">\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed\uff08\u305d\u306e\uff12\uff09<\/a><br \/>\n\u30fb<a href=\"http:\/\/ameblo.jp\/gidgeerock\/entry-11150087969.html\" title=\"\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u5370\u5237\u3059\u308b\u65b9\u6cd5\" target=\"_blank\">\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u5370\u5237\u3059\u308b\u65b9\u6cd5<\/a><\/p>\n<p>\u4e0b\u8a18\u300c<strong>OutPutKeyBindings<\/strong>\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u6a19\u6e96\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u542b\u3081\u305f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb(\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3082\u306e\u306e\u307f)\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30ad\u30fc\u5b9a\u7fa9\u4e00\u89a7\u3092CSV\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub OutPutKeyBindings()\r\n'\u30ad\u30fc\u5b9a\u7fa9\u51fa\u529b\r\n  Dim OutputFilePath As String\r\n  Dim tp As Word.Template\r\n  Dim tmp As Word.Template\r\n  Dim kb As Word.KeyBinding\r\n  Dim ff As Integer\r\n  \r\n  '\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u6e96\u5099(\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u306bCSV\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b)\r\n  OutputFilePath = CreateObject(&quot;WScript.Shell&quot;).SpecialFolders(&quot;Desktop&quot;) &amp; _\r\n                   Application.PathSeparator &amp; &quot;WordKeyBindings.csv&quot;\r\n  ff = FreeFile\r\n  Open OutputFilePath For Output As #ff\r\n  Print #ff, &quot;\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u540d,\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30d1\u30b9,\u30b3\u30de\u30f3\u30c9,\u30ad\u30fc\u30b3\u30fc\u30c9,\u30ad\u30fc\u306e\u7d44\u307f\u5408\u308f\u305b&quot;\r\n    \r\n  Set tmp = Application.CustomizationContext '\u73fe\u5728\u306e\u4fdd\u5b58\u5148\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u53d6\u5f97\r\n  '\u6a19\u6e96\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\r\n  Application.CustomizationContext = NormalTemplate\r\n  For Each kb In Application.KeyBindings\r\n    Print #ff, &quot;\u6a19\u6e96\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8(&quot; &amp; NormalTemplate.Name &amp; &quot;),&quot; &amp; _\r\n               NormalTemplate.FullName &amp; &quot;,&quot; &amp; _\r\n               kb.Command &amp; &quot;,&quot; &amp; _\r\n               kb.KeyCode &amp; &quot;,&quot; &amp; _\r\n               kb.KeyString\r\n  Next\r\n  \r\n  '\u6a19\u6e96\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u4ee5\u5916\r\n  For Each tp In Application.Templates\r\n    If tp.FullName &lt;&gt; NormalTemplate.FullName Then\r\n      If IsInstalledTemplate(tp) = True Then\r\n        Application.CustomizationContext = tp\r\n        For Each kb In Application.KeyBindings\r\n           Print #ff, tp.Name &amp; &quot;,&quot; &amp; _\r\n                      tp.FullName &amp; &quot;,&quot; &amp; _\r\n                      kb.Command &amp; &quot;,&quot; &amp; _\r\n                      kb.KeyCode &amp; &quot;,&quot; &amp; _\r\n                      kb.KeyString\r\n        Next\r\n      End If\r\n    End If\r\n  Next\r\n  \r\n  Application.CustomizationContext = tmp '\u4fdd\u5b58\u5148\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5143\u306b\u623b\u3059\r\n  Set tmp = Nothing\r\n  Close #ff\r\n  MsgBox &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot; &amp; vbCrLf &amp; vbCrLf &amp; _\r\n         &quot;&#x5B;&quot; &amp; OutputFilePath &amp; &quot;]&quot; &amp; vbCrLf &amp; vbCrLf &amp; _\r\n         &quot;\u306b\u30ad\u30fc\u5b9a\u7fa9\u4e00\u89a7\u304c\u51fa\u529b\u3055\u308c\u307e\u3057\u305f\u3002&quot;, vbInformation + vbSystemModal\r\nEnd Sub\r\n\r\nPrivate Function IsInstalledTemplate(ByVal tp As Word.Template) As Boolean\r\n'\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\r\n  Dim ad As Word.AddIn\r\n  Dim ret As Boolean\r\n  \r\n  ret = False '\u521d\u671f\u5316\r\n  '\u6a19\u6e96\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067\u3042\u308c\u3070True\r\n  If tp.FullName = NormalTemplate.FullName Then\r\n    ret = True\r\n  Else\r\n    On Error Resume Next\r\n    Set ad = Application.AddIns(tp.FullName)\r\n    On Error GoTo 0\r\n    If Not ad Is Nothing Then\r\n      'Word\u30a2\u30c9\u30a4\u30f3\u30e9\u30a4\u30d6\u30e9\u30ea(WLL)\u3067\u306f\u306a\u3044 = \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u5834\u5408\u306e\u307f\u51e6\u7406\r\n      If ad.Compiled = False Then\r\n        If ad.Installed = True Then\r\n          ret = True\r\n        End If\r\n      End If\r\n      Set ad = Nothing\r\n    End If\r\n  End If\r\n  IsInstalledTemplate = ret\r\nEnd Function<\/pre>\n<p>CSV\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u3066\u304a\u3051\u3070\u3001Excel\u3084\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u81ea\u5206\u306e\u597d\u304d\u306a\u5f62\u306b\u52a0\u5de5\u3059\u308b\u3053\u3068\u304c\u5bb9\u6613\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordKeyBindings.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordKeyBindings-150x150.jpg\" alt=\"\" title=\"WordKeyBindings\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1222\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordKeyBindings-150x150.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/WordKeyBindings-75x75.jpg 75w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Word MVP\u306e\u65b0\u7530\u3055\u3093\u304c\u66f8\u304b\u308c\u305f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u898b\u3066\u601d\u3044\u3064\u3044\u305f\u30de\u30af\u30ed\u3067\u3059\u3002 \u30fb\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed \u30fb\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u3092\u3057\u305f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u66f8\u304d\u51fa\u3059\u30de\u30af\u30ed\uff08\u305d\u306e\uff12\uff09 \u30fb\u30e6\u30fc [&hellip;]","protected":false},"author":1,"featured_media":7134,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,49],"tags":[11,45,85],"class_list":["post-1221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-word-office","tag-office-2","tag-word-","tag-word-vba-2"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Word.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-jH","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1221","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=1221"}],"version-history":[{"count":4,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions"}],"predecessor-version":[{"id":2235,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1221\/revisions\/2235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7134"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}