{"id":6086,"date":"2015-08-14T13:38:08","date_gmt":"2015-08-14T04:38:08","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=6086"},"modified":"2015-09-29T13:50:22","modified_gmt":"2015-09-29T04:50:22","slug":"%e8%b5%b7%e5%8b%95%e4%b8%ad%e3%81%aemicrosoft-edge%e3%81%8b%e3%82%89%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8url%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%addom","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=6086","title":{"rendered":"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)"},"content":{"rendered":"<p><a href=\"\/\/www.ka-net.org\/blog\/?p=6076\" title=\"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(UI Automation\u7de8) | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3067\u3001UI Automation\u3092\u4f7f\u3063\u3066\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4ee5\u524d\u66f8\u3044\u305f\u8a18\u4e8b\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=6033\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8) | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/a>\u300d\u3067Edge\u306e\u4e2d\u306b\u3042\u308bInternet Explorer_Server\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089HTMLDocument(JScriptTypeInfo\u3067\u3057\u305f\u304c\u2026)\u3092\u53d6\u5f97\u3067\u304d\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u3061\u3089\u3092\u4f7f\u3063\u305f\u65b9\u304c\u697d\u306bEdge\u3067\u958b\u3044\u3066\u3044\u308b\u30da\u30fc\u30b8\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2015\/9\/29 \u8ffd\u8a18\uff1a<\/span><br \/>\n\u30b3\u30fc\u30c9\u306b\u4e00\u90e8\u4e0d\u5177\u5408\u304c\u3042\u3063\u305f\u306e\u3067\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">\u203b \u4e0b\u8a18\u30b3\u30fc\u30c9\u306f64\u30d3\u30c3\u30c8\u7248Office\u3067\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">'\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\r\nOption Explicit\r\n\r\nPrivate Type UUID\r\n  Data1 As Long\r\n  Data2 As Integer\r\n  Data3 As Integer\r\n  Data4(0 To 7) As Byte\r\nEnd Type\r\n\r\nPrivate Declare Function EnumWindows Lib &quot;user32&quot; (ByVal lpEnumFunc As Long, lParam As Long) As Long\r\nPrivate Declare Function EnumChildWindows Lib &quot;user32&quot; (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, lParam As Long) As Long\r\nPrivate Declare Function FindWindowEx Lib &quot;user32&quot; Alias &quot;FindWindowExA&quot; (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, ByVal lpszClass As String, ByVal lpszWindow As String) As Long\r\nPrivate Declare Function GetClassName Lib &quot;user32&quot; Alias &quot;GetClassNameA&quot; (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long\r\nPrivate Declare Function GetWindowText Lib &quot;user32&quot; Alias &quot;GetWindowTextA&quot; (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long\r\nPrivate Declare Function IsWindowVisible Lib &quot;user32&quot; (ByVal hWnd As Long) As Long\r\nPrivate Declare Function ObjectFromLresult Lib &quot;oleacc&quot; (ByVal lResult As Long, riid As Any, ByVal wParam As Long, ppvObject As Object) As Long\r\nPrivate Declare Function RegisterWindowMessage Lib &quot;user32&quot; Alias &quot;RegisterWindowMessageA&quot; (ByVal lpString As String) As Long\r\nPrivate Declare Function SendMessageTimeout Lib &quot;user32&quot; Alias &quot;SendMessageTimeoutA&quot; (ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal fuFlags As Long, ByVal uTimeout As Long, lpdwResult As Long) As Long\r\nPrivate Const SMTO_ABORTIFHUNG = &amp;H2\r\n\r\nPrivate hEdge As Long\r\n\r\nPublic Sub ListEdgeTabInfo()\r\n'\u8d77\u52d5\u4e2d\u306eEdge\u306e\u30bf\u30d6\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97(64\u30d3\u30c3\u30c8\u7248Office\u3067\u306f\u4e0d\u53ef)\r\n'http:\/\/www.mvps.org\/emorcillo\/en\/code\/vb6\/iedom.shtml \u53c2\u7167\r\n  hEdge = 0 '\u521d\u671f\u5316\r\n  EnumWindows AddressOf EnumWindowsProc, 0\r\n  If hEdge = 0 Then Exit Sub\r\n  EnumChildWindows hEdge, AddressOf EnumChildProc, 0\r\nEnd Sub\r\n\r\nPrivate Function EnumWindowsProc(ByVal hWnd As Long, lParam As Long) As Long\r\n  Dim buf1 As String * 255\r\n  Dim buf2 As String * 255\r\n  Dim ClassName As String\r\n  Dim WindowName As String\r\n  Dim hTmp As Long\r\n  \r\n  hTmp = 0 '\u521d\u671f\u5316\r\n  If IsWindowVisible(hWnd) Then\r\n    GetClassName hWnd, buf1, Len(buf1)\r\n    ClassName = Left(buf1, InStr(buf1, vbNullChar) - 1)\r\n    Select Case ClassName\r\n      Case &quot;ApplicationFrameWindow&quot; '\u975e\u6700\u5c0f\u5316\u6642\r\n        hTmp = FindWindowEx(hWnd, 0, &quot;Windows.UI.Core.CoreWindow&quot;, &quot;Microsoft Edge&quot;)\r\n        If hTmp &lt;&gt; 0 Then\r\n          hEdge = hWnd\r\n          EnumWindowsProc = False\r\n          Exit Function\r\n        End If\r\n      Case &quot;Windows.UI.Core.CoreWindow&quot; '\u6700\u5c0f\u5316\u6642\r\n        GetWindowText hWnd, buf2, Len(buf2)\r\n        WindowName = Left(buf2, InStr(buf2, vbNullChar) - 1)\r\n        If WindowName = &quot;Microsoft Edge&quot; Then\r\n          hEdge = hWnd\r\n          EnumWindowsProc = False\r\n          Exit Function\r\n        End If\r\n    End Select\r\n  End If\r\n  EnumWindowsProc = True\r\nEnd Function\r\n\r\nPrivate Function EnumChildProc(ByVal hWnd As Long, ByVal lParam As Long) As Long\r\n  Dim buf As String * 255\r\n  Dim ClassName As String\r\n  Dim d As Object\r\n  \r\n  GetClassName hWnd, buf, Len(buf)\r\n  ClassName = Left(buf, InStr(buf, vbNullChar) - 1)\r\n  If ClassName = &quot;Internet Explorer_Server&quot; Then\r\n    Set d = GetHTMLDocumentFromWindow(hWnd)\r\n    If Not d Is Nothing Then\r\n      Debug.Print d.Title, d.Location.href\r\n    End If\r\n  End If\r\n  EnumChildProc = True\r\nEnd Function\r\n\r\nPrivate Function GetHTMLDocumentFromWindow(ByVal hWnd As Long) As Object\r\n  Dim msg As Long\r\n  Dim res As Long\r\n  Dim ret As Object\r\n  Dim d As Object\r\n  Dim IID_IHTMLDocument As UUID\r\n  \r\n  Set ret = Nothing '\u521d\u671f\u5316\r\n  msg = RegisterWindowMessage(&quot;WM_HTML_GETOBJECT&quot;)\r\n  SendMessageTimeout hWnd, msg, 0, 0, SMTO_ABORTIFHUNG, 1000, res\r\n  If res Then\r\n    With IID_IHTMLDocument\r\n      .Data1 = &amp;H626FC520\r\n      .Data2 = &amp;HA41E\r\n      .Data3 = &amp;H11CF\r\n      .Data4(0) = &amp;HA7\r\n      .Data4(1) = &amp;H31\r\n      .Data4(2) = &amp;H0\r\n      .Data4(3) = &amp;HA0\r\n      .Data4(4) = &amp;HC9\r\n      .Data4(5) = &amp;H8\r\n      .Data4(6) = &amp;H26\r\n      .Data4(7) = &amp;H37\r\n    End With\r\n    If ObjectFromLresult(res, IID_IHTMLDocument, 0, d) = 0 Then Set ret = d\r\n  End If\r\n  Set GetHTMLDocumentFromWindow = ret\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=6033\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8) | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/a>\u300d\u3068\u307b\u307c\u540c\u3058\u3067\u3001Internet Explorer_Server\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u63a2\u3057\u3066\u9806\u756a\u306bDOM\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001Edge\u304c\u6700\u5c0f\u5316\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306fApplicationFrameWindow\u306e\u5b50\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089Internet Explorer_Server\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u6700\u5c0f\u5316\u6642\u306e\u51e6\u7406\u306f\u5225\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">\u95a2\u9023\u8a18\u4e8b<\/h4>\n<ul>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6018\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6018<\/a><\/li>\n<li>PowerShell\u3067Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6029\" target=\"_blank\" title=\"PowerShell\u3067Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b\">\/\/www.ka-net.org\/blog\/?p=6029<\/a><\/li>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6033\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6033<\/a><\/li>\n<li>\u7d9a\u30fbMicrosoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6068\" target=\"_blank\" title=\"\u7d9a\u30fbMicrosoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6068<\/a><\/li>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBScript<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6129\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBScript\">\/\/www.ka-net.org\/blog\/?p=6129<\/a><\/li>\n<li>\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(UI Automation\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6076\" target=\"_blank\" title=\"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(UI Automation\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6076<\/a><\/li>\n<li>\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6086\" target=\"_blank\" title=\"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6086<\/a><\/li>\n<li>Microsoft Edge\u3067Web\u30da\u30fc\u30b8\u3092\u958b\u304f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6040\" target=\"_blank\" title=\"Microsoft Edge\u3067Web\u30da\u30fc\u30b8\u3092\u958b\u304f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\">\/\/www.ka-net.org\/blog\/?p=6040<\/a><\/li>\n<li>Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bVBScript<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6048\" target=\"_blank\" title=\"Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bVBScript\">\/\/www.ka-net.org\/blog\/?p=6048<\/a><\/li>\n<li>Microsoft Edge\u3067\u30ea\u30f3\u30af\u5148\u3092\u958b\u304f<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6050\" target=\"_blank\" title=\"Microsoft Edge\u3067\u30ea\u30f3\u30af\u5148\u3092\u958b\u304f\">\/\/www.ka-net.org\/blog\/?p=6050<\/a><\/li>\n<li>\u300c\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u300d\u304b\u3089Microsoft Edge\u3092\u8d77\u52d5\u3059\u308b<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6098\" target=\"_blank\" title=\"\u300c\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u300d\u304b\u3089Microsoft Edge\u3092\u8d77\u52d5\u3059\u308b\">\/\/www.ka-net.org\/blog\/?p=6098<\/a><\/li>\n","protected":false},"excerpt":{"rendered":"\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001UI Automation\u3092\u4f7f\u3063\u3066\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u4ee5\u524d\u66f8\u3044\u305f\u8a18\u4e8b\u300cMicrosoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8 [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"UI Automation\u3088\u308a\u306f\u78ba\u5b9f\u3067\u3059\u304c\u3001\u3053\u308c\u3082\u4f7f\u3048\u308b\u304b\u3069\u3046\u304b\u2026\u3002 [\u8d77\u52d5\u4e2d\u306eMicrosoft #Edge \u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)]","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":[48,132,4,49,25,58,133],"tags":[],"class_list":["post-6086","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-office","category-windows10","category-office","category-word-office","category-windows","category-powerpoint","category-microsoft-edge"],"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-1Aa","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6086","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=6086"}],"version-history":[{"count":6,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6086\/revisions"}],"predecessor-version":[{"id":6228,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6086\/revisions\/6228"}],"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=6086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}