{"id":2294,"date":"2012-10-03T14:04:09","date_gmt":"2012-10-03T05:04:09","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=2294"},"modified":"2013-08-27T16:59:18","modified_gmt":"2013-08-27T07:59:18","slug":"%e3%82%a2%e3%82%af%e3%83%86%e3%82%a3%e3%83%96%e3%81%aa%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8bpowerpoint%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=2294","title":{"rendered":"\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30e9\u30a4\u30c9\u3092\u53d6\u5f97\u3059\u308bPowerPoint\u30de\u30af\u30ed"},"content":{"rendered":"<p>PowerPoint\u306e\u30de\u30af\u30ed\u3092\u89e6\u3063\u3066\u3044\u3066\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">ActiveSlide<\/span>\u300d\u306e\u3088\u3046\u306a\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30e9\u30a4\u30c9\u3092\u53d6\u5f97\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u306a\u3044\u3088\u3046\u3060\u3063\u305f\u306e\u3067\u95a2\u6570\u3092\u81ea\u4f5c\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim p As PowerPoint.Presentation\r\n  Dim s As PowerPoint.Slide\r\n  \r\n  For Each p In Application.Presentations\r\n    Set s = GetActiveSlide(p)\r\n    If s Is Nothing Then\r\n      MsgBox &quot;\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30e9\u30a4\u30c9\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002&quot;, vbCritical + vbSystemModal\r\n    Else\r\n      MsgBox &quot;\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7:&quot; &amp; s.SlideIndex &amp; vbCrLf &amp; &quot;\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6570:&quot; &amp; s.Shapes.Count, vbInformation + vbSystemModal\r\n    End If\r\n  Next\r\nEnd Sub\r\n\r\nPublic Function GetActiveSlide(ByVal p As Presentation) As Slide\r\n  Dim ret As Slide\r\n  \r\n  Set ret = Nothing '\u521d\u671f\u5316\r\n  On Error Resume Next\r\n  Set ret = p.Slides.FindBySlideID(p.Windows(1).Selection.SlideRange.SlideID)\r\n  On Error GoTo 0\r\n  Set GetActiveSlide = ret\r\nEnd Function<\/pre>\n<p>\u95a2\u6570\u306e\u4ed5\u7d44\u307f\u306f\u5358\u7d14\u3067\u3001\u9078\u629e\u3057\u3066\u3044\u308bSlideRange\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eSlideID\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u3001Slides\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eFindBySlideID\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3059\u3053\u3068\u3067Slide\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"PowerPoint\u306e\u30de\u30af\u30ed\u3092\u89e6\u3063\u3066\u3044\u3066\u3001\u300cActiveSlide\u300d\u306e\u3088\u3046\u306a\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30e9\u30a4\u30c9\u3092\u53d6\u5f97\u3059\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u306a\u3044\u3088\u3046\u3060\u3063\u305f\u306e\u3067\u95a2\u6570\u3092\u81ea\u4f5c\u3057\u307e\u3057\u305f\u3002 Option Explicit Public Sub Samp [&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":[90,91],"class_list":["post-2294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-powerpoint","tag-powerpoint-vba","tag-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-B0","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2294","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=2294"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2294\/revisions"}],"predecessor-version":[{"id":2296,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2294\/revisions\/2296"}],"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=2294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}