{"id":1544,"date":"2012-03-23T17:55:03","date_gmt":"2012-03-23T08:55:03","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=1544"},"modified":"2014-09-18T15:20:06","modified_gmt":"2014-09-18T06:20:06","slug":"onenote%e3%81%ae%e3%83%8e%e3%83%bc%e3%83%88%e5%90%8d%e3%82%92%e5%88%97%e6%8c%99%e3%81%99%e3%82%8b%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=1544","title":{"rendered":"OneNote\u306e\u30ce\u30fc\u30c8\u540d\u3092\u5217\u6319\u3059\u308b\u30de\u30af\u30ed"},"content":{"rendered":"<p>\u4eca\u56de\u306fOneNote\u306e\u30ce\u30fc\u30c8\u540d\u3092\u5217\u6319\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n'OneNote\u306e\u30ce\u30fc\u30c8\u540d\u3092\u5217\u6319\u3059\u308b\r\n\r\n'GetHierarchy\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c2\u5f15\u6570:hsScope\u3067\u6307\u5b9a\u3059\u308b\u5024\u306f\u4e0b\u8a18\u306e\u901a\u308a\r\n'  hsSelf:0\r\n'  hsChildren:1\r\n'  hsNotebooks:2\r\n'  hsSections:3\r\n'  hsPages:4\r\n\r\n  Dim x As String\r\n  Dim elm As Object\r\n  \r\n  CreateObject(&quot;OneNote.Application&quot;).GetHierarchy vbNullString, 2, x\r\n  With CreateObject(&quot;Msxml2.DOMDocument&quot;)\r\n    .async = False\r\n    If .LoadXML(x) Then\r\n      For Each elm In .SelectNodes(&quot;\/one:Notebooks\/one:Notebook&quot;)\r\n        Debug.Print elm.getAttribute(&quot;name&quot;)\r\n      Next\r\n    End If\r\n  End With\r\nEnd Sub<\/pre>\n<p>\u6700\u521d\u306fApplication\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 > Notebooks\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 > Notebook\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u306e\u3088\u3046\u306a\u5f62\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306f\u9055\u3063\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u30ce\u30fc\u30c8\u3084\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u60c5\u5831\u3092\u5f97\u308b\u306b\u306f\u3001<span style=\"color: #ff0000; font-weight: bold;\">GetHierarchy\u30e1\u30bd\u30c3\u30c9<\/span>\u3067\u968e\u5c64\u69cb\u9020\u3092XML\u3068\u3057\u3066\u53d6\u5f97\u3057\u3001\u30ce\u30fc\u30c9\u3092\u5217\u6319\u3057\u3066\u3044\u3051\u3070\u826f\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><strong>\u30fbOffice 2010 \u306e\u958b\u767a\u8005\u306e\u305f\u3081\u306e\u65b0\u6a5f\u80fd &#8211; OneNote 2010<\/strong><br \/>\n<a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/ff955606.aspx#odc_office14_ta_WhatsNewforOffice2010Developers_OneNote2010\" title=\"Office 2010 \u306e\u958b\u767a\u8005\u306e\u305f\u3081\u306e\u65b0\u6a5f\u80fd - OneNote 2010\" target=\"_blank\">http:\/\/msdn.microsoft.com\/ja-jp\/library\/ff955606.aspx#odc_office14_ta_WhatsNewforOffice2010Developers_OneNote2010<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u4eca\u56de\u306fOneNote\u306e\u30ce\u30fc\u30c8\u540d\u3092\u5217\u6319\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 Option Explicit Public Sub Sample() &#8216;OneNote\u306e\u30ce\u30fc\u30c8\u540d\u3092\u5217\u6319\u3059\u308b &#8216;GetHierarchy\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c2\u5f15\u6570:h [&hellip;]","protected":false},"author":1,"featured_media":7111,"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,48,49,55],"tags":[11,142],"class_list":["post-1544","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","category-onenote","tag-office-2","tag-onenote"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-oU","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1544","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=1544"}],"version-history":[{"count":3,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1544\/revisions"}],"predecessor-version":[{"id":1547,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1544\/revisions\/1547"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}