{"id":2101,"date":"2012-07-23T15:54:17","date_gmt":"2012-07-23T06:54:17","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=2101"},"modified":"2013-01-30T17:06:16","modified_gmt":"2013-01-30T08:06:16","slug":"javascript-api-for-office%e9%81%b8%e6%8a%9e%e7%af%84%e5%9b%b2%e5%a4%89%e6%9b%b4%e6%99%82%e3%81%ae%e3%82%a4%e3%83%99%e3%83%b3%e3%83%88%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=2101","title":{"rendered":"[Office\u7528\u30a2\u30d7\u30ea]\u9078\u629e\u7bc4\u56f2\u5909\u66f4\u6642\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u5229\u7528\u3059\u308b\u3002"},"content":{"rendered":"<p><span style=\"color: #ff0000; font-weight: bold;\">\u203b \u3053\u306e\u60c5\u5831\u306fOffice 2013 \u30ab\u30b9\u30bf\u30de\u30fc \u30d7\u30ec\u30d3\u30e5\u30fc\u7248\u3092\u5143\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u88fd\u54c1\u7248\u3067\u306f\u5909\u66f4\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<p>\u4eca\u56de\u306fJavaScript API for Office\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u9078\u629e\u7bc4\u56f2\u5909\u66f4\u6642\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u30a2\u30d7\u30ea\u306e\u8a2d\u5b9a\u3084\u767b\u9332\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3053\u3053\u3067\u306f\u8aac\u660e\u3057\u307e\u305b\u3093\u306e\u3067\u3001<a href=\"\/\/www.ka-net.org\/blog\/?p=2022\" title=\"JavaScript\u3067Excel 2013\u7528\u4f5c\u696d\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002(2)\" target=\"_blank\">JavaScript\u3067Excel 2013\u7528\u4f5c\u696d\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002(2)<\/a>\u3084<a href=\"\/\/www.ka-net.org\/blog\/?p=2050\" title=\"JavaScript\u3067Excel 2013\u7528\u4f5c\u696d\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002(3)\" target=\"_blank\">JavaScript\u3067Excel 2013\u7528\u4f5c\u696d\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3002(3)<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>\u30fbhtml<\/strong><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;meta charset=&quot;UTF-8&quot;&gt;\r\n        &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot;&gt;\r\n        &lt;script src=&quot;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.7.2\/jquery.min.js&quot;&gt;&lt;\/script&gt;\r\n        &lt;script src=&quot;https:\/\/az88874.vo.msecnd.net\/api\/1.0\/office.js&quot;&gt;&lt;\/script&gt;\r\n        &lt;script&gt;\r\n            Office.initialize = function (reason) {\r\n                $(document).ready(function () {\r\n                    $(&quot;#btnClear&quot;).click(function() {$(&quot;#message&quot;).html(&quot;&quot;);});\r\n                    Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, MyHandler);\r\n                });\r\n            }\r\n            \r\n            function MyHandler(eventArgs) {\r\n                write(&quot;Event raised: &quot; + eventArgs.type);\r\n                eventArgs.document.setSelectedDataAsync(&quot;Hello.&quot;);\r\n            }\r\n            \r\n            function write(message) {\r\n                $(&quot;#message&quot;).html($(&quot;#message&quot;).html() + message + &quot;&lt;br&gt;&quot;);\r\n            }\r\n        &lt;\/script&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n        &lt;input id=&quot;btnClear&quot; type=&quot;button&quot; value=&quot;Message Clear&quot;&gt;\r\n        &lt;div id=&quot;message&quot;&gt;&lt;\/div&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u305f\u30a2\u30d7\u30ea\u3092\u633f\u5165\u3059\u308b\u3068\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u8aad\u307f\u8fbc\u307f\u6642\u306b<span style=\"color: #ff0000; font-weight: bold;\">addHandlerAsync\u30e1\u30bd\u30c3\u30c9<\/span>\u306b\u3088\u3063\u3066Document\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<span style=\"color: #ff0000; font-weight: bold;\">SelectionChanged\u30a4\u30d9\u30f3\u30c8<\/span>\u3068\u6307\u5b9a\u3057\u305f\u95a2\u6570\u304c\u7d50\u3073\u4ed8\u3051\u3089\u308c\u3001\u9078\u629e\u7bc4\u56f2\u5909\u66f4\u6642\u306b\u4efb\u610f\u306e\u95a2\u6570(\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f MyHandler)\u304c\u547c\u3070\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01-300x294.jpg\" alt=\"\" title=\"Office2013_15_01\" width=\"300\" height=\"294\" class=\"alignnone size-medium wp-image-2102\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01-300x294.jpg 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01-75x75.jpg 75w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01-290x284.jpg 290w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01-150x147.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/Office2013_15_01.jpg 668w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u4f7f\u3044\u65b9\u6b21\u7b2c\u3067\u306f\u4fbf\u5229\u306a\u30a4\u30d9\u30f3\u30c8\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u30fbDocument.addHandlerAsync method (apps for Office)<\/strong><br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/fp161169%28v=office.15%29.aspx\" title=\"Document.addHandlerAsync method (apps for Office)\" target=\"_blank\">http:\/\/msdn.microsoft.com\/en-us\/library\/fp161169%28v=office.15%29.aspx<\/a><br \/>\n<strong>\u30fbDocument.SelectionChanged event (apps for Office)<\/strong><br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/fp161062%28v=office.15%29\" title=\"Document.SelectionChanged event (apps for Office)\" target=\"_blank\">http:\/\/msdn.microsoft.com\/en-us\/library\/fp161062%28v=office.15%29<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u203b \u3053\u306e\u60c5\u5831\u306fOffice 2013 \u30ab\u30b9\u30bf\u30de\u30fc \u30d7\u30ec\u30d3\u30e5\u30fc\u7248\u3092\u5143\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u88fd\u54c1\u7248\u3067\u306f\u5909\u66f4\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002 \u4eca\u56de\u306fJavaScript API for Office\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u9078\u629e\u7bc4\u56f2\u5909 [&hellip;]","protected":false},"author":1,"featured_media":7119,"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":[130,4,79],"tags":[74,77],"class_list":["post-2101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apps-for-office","category-office","category-office2013","tag-office-2013","tag-apps-for-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeAddins.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-xT","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2101","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=2101"}],"version-history":[{"count":5,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2101\/revisions"}],"predecessor-version":[{"id":2668,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2101\/revisions\/2668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7119"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}