{"id":5056,"date":"2014-10-24T16:39:23","date_gmt":"2014-10-24T07:39:23","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=5056"},"modified":"2014-10-24T16:39:23","modified_gmt":"2014-10-24T07:39:23","slug":"%e3%80%8c%e3%82%af%e3%82%a4%e3%83%83%e3%82%af%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%83%84%e3%83%bc%e3%83%ab%e3%83%90%e3%83%bc%e3%81%8b%e3%82%89powerpoint%e3%83%9e%e3%82%af%e3%83%ad%e3%82%92%e5%ae%9f","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=5056","title":{"rendered":"\u300c\u30af\u30a4\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u30c4\u30fc\u30eb\u30d0\u30fc\u304b\u3089PowerPoint\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30a2\u30c9\u30a4\u30f3\u300d\u306e\u30b3\u30fc\u30c9"},"content":{"rendered":"<p>2\u5e74\u307b\u3069\u524d\u306b\u66f8\u3044\u305fPowerPoint\u30de\u30af\u30ed\u306e\u8a18\u4e8b\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=1636\" title=\"\u30af\u30a4\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u30c4\u30fc\u30eb\u30d0\u30fc\u304b\u3089PowerPoint\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30a2\u30c9\u30a4\u30f3\u306e\u7d39\u4ecb\" target=\"_blank\">\u30af\u30a4\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u30c4\u30fc\u30eb\u30d0\u30fc\u304b\u3089PowerPoint\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30a2\u30c9\u30a4\u30f3\u306e\u7d39\u4ecb<\/a>\u300d\u306b\u5bfe\u3057\u3066\u3001\u30a2\u30c9\u30a4\u30f3\u306e\u30b3\u30fc\u30c9\u3092\u898b\u305f\u3044\u3068\u3044\u3046\u30b3\u30e1\u30f3\u30c8\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u8f09\u305b\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u30fb\u30ea\u30dc\u30f3XML<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;customUI xmlns=&quot;http:\/\/schemas.microsoft.com\/office\/2006\/01\/customui&quot;&gt;\r\n  &lt;ribbon&gt;\r\n    &lt;tabs&gt;\r\n      &lt;tab id=&quot;tabCallProc&quot; label=&quot;\u30de\u30af\u30ed\u547c\u51fa&quot; visible=&quot;false&quot;&gt;\r\n        &lt;group id=&quot;grpCallProc&quot; label=&quot;\u30de\u30af\u30ed\u547c\u51fa&quot;&gt;\r\n          &lt;dynamicMenu id=&quot;dmuCallProc&quot; label=&quot;\u30de\u30af\u30ed\u547c\u51fa&quot; imageMso=&quot;VisualBasic&quot; size=&quot;normal&quot; screentip=&quot;\u30de\u30af\u30ed\u547c\u51fa\u30e1\u30cb\u30e5\u30fc&quot; supertip=&quot;\u767b\u9332\u3055\u308c\u305f\u30a2\u30c9\u30a4\u30f3\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002&quot; getContent=&quot;dmuCallProc_getContent&quot; \/&gt;\r\n        &lt;\/group&gt;\r\n      &lt;\/tab&gt;\r\n    &lt;\/tabs&gt;\r\n  &lt;\/ribbon&gt;\r\n&lt;\/customUI&gt;<\/pre>\n<p><strong>\u30fb\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub dmuCallProc_getContent(control As IRibbonControl, ByRef returnedVal)\r\n  Dim DataFilePath As String\r\n  Dim buf As String\r\n  Dim ff As Integer\r\n  Dim d As Object\r\n  Dim elmMenu As Object\r\n  Dim elmButton As Object\r\n  Dim v As Variant\r\n  Dim i As Long\r\n  Dim j As Long\r\n  \r\n  Const MyAddInName As String = &quot;CallProcAddin&quot; '\u3053\u306e\u30a2\u30c9\u30a4\u30f3\u540d\r\n  Const DataFileName As String = &quot;macrodat.txt&quot; '\u30de\u30af\u30ed\u30c7\u30fc\u30bf\u540d\r\n  Const BtnID As String = &quot;btnCallProc&quot;\r\n  \r\n  On Error Resume Next\r\n  If Application.AddIns(MyAddInName).Loaded &lt;&gt; msoTrue Then\r\n    MsgBox &quot;\u30a2\u30c9\u30a4\u30f3\u304c\u8aad\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002&quot; &amp; vbCrLf &amp; &quot;\u51e6\u7406\u3092\u4e2d\u6b62\u3057\u307e\u3059\u3002&quot;, vbCritical + vbSystemModal\r\n    Exit Sub\r\n  End If\r\n  On Error GoTo 0\r\n  \r\n  DataFilePath = Application.AddIns(MyAddInName).Path\r\n  If Right$(DataFilePath, 1) &lt;&gt; &quot;\\&quot; Then DataFilePath = DataFilePath &amp; &quot;\\&quot;\r\n  DataFilePath = DataFilePath &amp; DataFileName\r\n  Set d = CreateObject(&quot;Msxml2.DOMDocument&quot;)\r\n  Set elmMenu = d.createElement(&quot;menu&quot;)\r\n  elmMenu.setAttribute &quot;xmlns&quot;, &quot;http:\/\/schemas.microsoft.com\/office\/2006\/01\/customui&quot;\r\n  elmMenu.setAttribute &quot;itemSize&quot;, &quot;normal&quot;\r\n  If Len(Dir$(DataFilePath)) &lt; 1 Then\r\n    Set elmButton = d.createElement(&quot;button&quot;)\r\n    With elmButton\r\n      .setAttribute &quot;id&quot;, BtnID\r\n      .setAttribute &quot;label&quot;, &quot;\u30de\u30af\u30ed\u30c7\u30fc\u30bf\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002&quot;\r\n      .setAttribute &quot;imageMso&quot;, &quot;QueryRunQuery&quot;\r\n      .setAttribute &quot;screentip&quot;, &quot;\u30de\u30af\u30ed\u30c7\u30fc\u30bf\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002&quot;\r\n      .setAttribute &quot;supertip&quot;, &quot;&#x5B;&quot; &amp; DataFilePath &amp; &quot;]\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002&quot;\r\n    End With\r\n    elmMenu.appendChild elmButton\r\n    Set elmButton = Nothing\r\n  Else\r\n    i = 1: j = 1 '\u521d\u671f\u5316\r\n    ff = FreeFile\r\n    Open DataFilePath For Input As #ff\r\n    Do Until EOF(ff)\r\n      Line Input #ff, buf\r\n      If Len(buf) &gt; 0 Then\r\n        v = Split(buf, &quot;;&quot;)\r\n        'Debug.Print &quot;AddInName:&quot; &amp; v(0), &quot;Caption:&quot; &amp; v(1), &quot;MacroName:&quot; &amp; v(2)\r\n        If j &gt; 9 Then j = 1\r\n        Set elmButton = d.createElement(&quot;button&quot;)\r\n        With elmButton\r\n          .setAttribute &quot;id&quot;, BtnID &amp; CStr(i)\r\n          .setAttribute &quot;label&quot;, v(1) &amp; &quot;(&quot; &amp; ChrW(38) &amp; CStr(j) &amp; &quot;)&quot;\r\n          .setAttribute &quot;imageMso&quot;, &quot;MacroRun&quot;\r\n          .setAttribute &quot;screentip&quot;, &quot;\u30a2\u30c9\u30a4\u30f3\u540d:&quot; &amp; v(0)\r\n          .setAttribute &quot;supertip&quot;, &quot;\u30de\u30af\u30ed\u540d:&quot; &amp; v(2)\r\n          .setAttribute &quot;tag&quot;, v(0) &amp; &quot;|&quot; &amp; v(2)\r\n          .setAttribute &quot;onAction&quot;, BtnID &amp; &quot;_onAction&quot;\r\n        End With\r\n        elmMenu.appendChild elmButton\r\n        Set elmButton = Nothing\r\n        i = i + 1\r\n        j = j + 1\r\n      End If\r\n    Loop\r\n    Close #ff\r\n  End If\r\n  d.appendChild elmMenu\r\n  returnedVal = d.XML\r\nEnd Sub\r\n\r\nPublic Sub btnCallProc_onAction(control As IRibbonControl)\r\n  Dim v As Variant\r\n  \r\n  On Error Resume Next\r\n  v = Split(control.Tag, &quot;|&quot;)\r\n  Application.Run v(0) &amp; &quot;!&quot; &amp; v(1)\r\n  If Err.Number &lt;&gt; 0 Then\r\n    MsgBox &quot;\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002&quot; &amp; vbCrLf &amp; vbCrLf &amp; _\r\n           &quot;\u30a8\u30e9\u30fcNo:&quot; &amp; Err.Number &amp; vbCrLf &amp; _\r\n           &quot;\u30a8\u30e9\u30fc\u60c5\u5831\uff1a&quot; &amp; Err.Description, vbCritical + vbSystemModal\r\n    Err.Clear\r\n  End If\r\n  On Error GoTo 0\r\nEnd Sub<\/pre>\n<p>\u4e45\u3057\u3076\u308a\u306b\u5f15\u3063\u5f35\u308a\u51fa\u3057\u3066\u304d\u305f\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u3067\u3001\u4e0a\u8a18\u30b3\u30fc\u30c9\u304c\u6700\u65b0\u7248\u304b\u3069\u3046\u304b\u306f\u5206\u304b\u308a\u307e\u305b\u3093\u304c(^^; \u3001\u57fa\u672c\u7684\u306a\u4ed5\u7d44\u307f\u306f\u5909\u308f\u3063\u3066\u3044\u306a\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>dynamicMenu\u8981\u7d20\u306egetContent\u5c5e\u6027\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u52d5\u7684\u306bXML\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3055\u308c\u305f\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u5f62\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"2\u5e74\u307b\u3069\u524d\u306b\u66f8\u3044\u305fPowerPoint\u30de\u30af\u30ed\u306e\u8a18\u4e8b\u300c\u30af\u30a4\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u30c4\u30fc\u30eb\u30d0\u30fc\u304b\u3089PowerPoint\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30a2\u30c9\u30a4\u30f3\u306e\u7d39\u4ecb\u300d\u306b\u5bfe\u3057\u3066\u3001\u30a2\u30c9\u30a4\u30f3\u306e\u30b3\u30fc\u30c9\u3092\u898b\u305f\u3044\u3068\u3044\u3046\u30b3\u30e1\u30f3\u30c8\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u305d\u306e\u307e\u307e\u8f09\u305b\u308b\u3053 [&hellip;]","protected":false},"author":1,"featured_media":7130,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u9700\u8981\u304c\u3042\u308b\u306e\u304b\u8b0e\u306a\u30de\u30af\u30ed\u3067\u3059\u3002 [\u300c\u30af\u30a4\u30c3\u30af\u30a2\u30af\u30bb\u30b9\u30c4\u30fc\u30eb\u30d0\u30fc\u304b\u3089PowerPoint\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30a2\u30c9\u30a4\u30f3\u300d\u306e\u30b3\u30fc\u30c9]","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,1,58],"tags":[],"class_list":["post-5056","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-ribbon","category-powerpoint"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Ribbon.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1jy","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5056","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=5056"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5056\/revisions"}],"predecessor-version":[{"id":5057,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/5056\/revisions\/5057"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7130"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}