{"id":4323,"date":"2014-03-25T17:50:13","date_gmt":"2014-03-25T08:50:13","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=4323"},"modified":"2014-03-25T17:50:35","modified_gmt":"2014-03-25T08:50:35","slug":"%e5%9b%b3%e5%bd%a2%e3%81%ae%e7%b5%90%e5%90%88%e3%82%92%e8%a1%8c%e3%81%86powerpoint-%e3%83%9e%e3%82%af%e3%83%adexecutemso%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=4323","title":{"rendered":"\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046PowerPoint \u30de\u30af\u30ed(ExecuteMso\u30e1\u30bd\u30c3\u30c9\u7de8)"},"content":{"rendered":"<p><a href=\"http:\/\/www.relief.jp\/itnote\/\" title=\"\u30a4\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u30fc\u306e\u30cd\u30bf\u5e33\" target=\"_blank\">Excel MVP\u306e\u4f0a\u85e4\u3055\u3093\u306e\u30d6\u30ed\u30b0<\/a>\u3067\u3001PowerPoint\u306e\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u56f3\u5f62\u306e\u7d50\u5408<\/span>\u300d\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p><strong>\u30fb\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046PowerPoint\u30de\u30af\u30ed<\/strong><br \/>\n<a href=\"http:\/\/www.relief.jp\/itnote\/archives\/powerpoint-vba-merge-shapes.php\" title=\"\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046PowerPoint\u30de\u30af\u30ed\" target=\"_blank\">http:\/\/www.relief.jp\/itnote\/archives\/powerpoint-vba-merge-shapes.php<\/a><br \/>\n<strong>\u30fbPowerPoint 2010\u3067\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046<\/strong><br \/>\n<a href=\"http:\/\/www.relief.jp\/itnote\/archives\/powerpoint-2010-merge-shapes.php\" title=\"PowerPoint 2010\u3067\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046\" target=\"_blank\">http:\/\/www.relief.jp\/itnote\/archives\/powerpoint-2010-merge-shapes.php<\/a><\/p>\n<p>PowerPoint 2013\u3067\u8ffd\u52a0\u3055\u308c\u305f\u3001<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/office\/jj230480.aspx\" title=\"ShapeRange.MergeShapes \u30e1\u30bd\u30c3\u30c9 (PowerPoint)\" target=\"_blank\">ShapeRange\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eMergeShapes\u30e1\u30bd\u30c3\u30c9<\/a>\u3092\u4f7f\u3063\u305f\u30de\u30af\u30ed\u3068\u3001PowerPoint 2010\u3067\u306e\u56f3\u5f62\u306e\u7d50\u5408\u65b9\u6cd5\u304c\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u307e\u3067PowerPoint\u3067\u56f3\u5f62\u3092\u7d50\u5408\u3057\u305f\u3053\u3068\u304c\u7121\u304f\u3001\u3053\u306e\u30b3\u30de\u30f3\u30c9\u304c\u3042\u3063\u305f\u3053\u3068\u3059\u3089\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u5927\u5909\u52c9\u5f37\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3075\u3068\u601d\u3063\u305f\u306e\u304c\u3001<\/p>\n<p><em>&#8220;PowerPoint 2010\u3067\u3082\u30b3\u30de\u30f3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001ExecuteMso\u30e1\u30bd\u30c3\u30c9\u3067\u547c\u3073\u51fa\u305b\u3070\u826f\u3044\u3093\u3058\u3083\u306a\u3044\u304b\uff1f&#8221;<\/em><\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u65e9\u901f\u30b3\u30fc\u30c9\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample()\r\n'&#x5B;\u56f3\u5f62\u306e\u578b\u629c\u304d\/\u5408\u6210]\u5b9f\u884c\r\n  With Application.CommandBars\r\n    If .GetEnabledMso(&quot;ShapesCombine&quot;) Then .ExecuteMso &quot;ShapesCombine&quot;\r\n  End With\r\nEnd Sub<\/pre>\n<p>\u56f3\u5f62\u306e\u9078\u629e\u72b6\u614b = \u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u306e\u5224\u5b9a\u306f<span style=\"color: #ff0000; font-weight: bold;\">GetEnabledMso\u30e1\u30bd\u30c3\u30c9<\/span>\u3092\u4f7f\u3048\u3070\u7c21\u5358\u306b\u884c\u3048\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u7d50\u5408\u306e\u7a2e\u985e\u3092\u30e6\u30fc\u30b6\u30fc\u5074\u3067\u9078\u629e\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample2()\r\n  Dim ret As String\r\n  \r\n  ret = VBA.InputBox(&quot;\u7d50\u5408\u306e\u7a2e\u985e\u30921\u304b\u30894\u306e\u756a\u53f7\u3067\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot; &amp; vbCrLf &amp; vbCrLf &amp; _\r\n                     &quot;1:\u56f3\u5f62\u306e\u63a5\u5408&quot; &amp; vbCrLf &amp; _\r\n                     &quot;2:\u56f3\u5f62\u306e\u578b\u629c\u304d\/\u5408\u6210&quot; &amp; vbCrLf &amp; _\r\n                     &quot;3:\u56f3\u5f62\u306e\u91cd\u306a\u308a\u62bd\u51fa&quot; &amp; vbCrLf &amp; _\r\n                     &quot;4:\u56f3\u5f62\u306e\u5358\u7d14\u578b\u629c\u304d&quot;, &quot;\u56f3\u5f62\u306e\u7d50\u5408\u5b9f\u884c&quot;)\r\n  If StrPtr(ret) = 0 Or Len(Trim(ret)) &lt; 1 Then Exit Sub\r\n  ret = StrConv(ret, vbNarrow)\r\n  Select Case Val(ret)\r\n    Case 1 To 4\r\n    Case Else: Exit Sub\r\n  End Select\r\n  ExecuteCombineShapes ret\r\nEnd Sub\r\n\r\nPrivate Sub ExecuteCombineShapes(ByVal idx As Long)\r\n'\u56f3\u5f62\u306e\u7d50\u5408\u5b9f\u884c\r\n  Dim aryMso(1 To 4) As String\r\n  \r\n  aryMso(1) = &quot;ShapesUnion&quot;     '\u56f3\u5f62\u306e\u63a5\u5408\r\n  aryMso(2) = &quot;ShapesCombine&quot;   '\u56f3\u5f62\u306e\u578b\u629c\u304d\/\u5408\u6210\r\n  aryMso(3) = &quot;ShapesIntersect&quot; '\u56f3\u5f62\u306e\u91cd\u306a\u308a\u62bd\u51fa\r\n  aryMso(4) = &quot;ShapesSubtract&quot;  '\u56f3\u5f62\u306e\u5358\u7d14\u578b\u629c\u304d\r\n  \r\n  With Application.CommandBars\r\n    If .GetEnabledMso(aryMso(idx)) Then\r\n      .ExecuteMso aryMso(idx)\r\n    Else\r\n      MsgBox &quot;\u56f3\u5f62\u3092\u8907\u6570\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;, vbExclamation + vbSystemModal\r\n    End If\r\n  End With\r\nEnd Sub<\/pre>\n<p>\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u56f3\u5f62\u306e\u7d50\u5408<\/span>\u300d\u3001\u521d\u3081\u3066\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u4e2d\u3005\u9762\u767d\u3044\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Excel MVP\u306e\u4f0a\u85e4\u3055\u3093\u306e\u30d6\u30ed\u30b0\u3067\u3001PowerPoint\u306e\u300c\u56f3\u5f62\u306e\u7d50\u5408\u300d\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002 \u30fb\u56f3\u5f62\u306e\u7d50\u5408\u3092\u884c\u3046PowerPoint\u30de\u30af\u30ed http:\/\/www.relief.jp\/itnote\/arc [&hellip;]","protected":false},"author":1,"featured_media":7125,"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,58],"tags":[],"class_list":["post-4323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-powerpoint"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-PowerPoint.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-17J","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4323","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=4323"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4323\/revisions"}],"predecessor-version":[{"id":4325,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4323\/revisions\/4325"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7125"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}