{"id":220,"date":"2011-08-21T19:03:24","date_gmt":"2011-08-21T10:03:24","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=220"},"modified":"2011-12-28T09:39:51","modified_gmt":"2011-12-28T00:39:51","slug":"64%e3%83%93%e3%83%83%e3%83%88%e7%89%88office%e3%81%a7url%e3%82%a8%e3%83%b3%e3%82%b3%e3%83%bc%e3%83%89%e5%87%a6%e7%90%86%e3%81%8c%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=220","title":{"rendered":"64\u30d3\u30c3\u30c8\u7248Office\u3067URL\u30a8\u30f3\u30b3\u30fc\u30c9\u51e6\u7406\u304c\u3067\u304d\u306a\u3044\uff1f"},"content":{"rendered":"<p><strong>2011\/12\/28 \u8ffd\u8a18\uff1a<\/strong><br \/>\n\u95a2\u9023\u8a18\u4e8b\u3068\u3057\u3066\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=1143\" title=\"\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066URL\u30a8\u30f3\u30b3\u30fc\u30c9\u3092\u884c\u3046\" target=\"_blank\">\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066URL\u30a8\u30f3\u30b3\u30fc\u30c9\u3092\u884c\u3046<\/a>\u300d\u3092\u66f8\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u300c<a href=\"\/\/www.ka-net.org\/office\/of32.html\" title=\"64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306eScriptControl\u306e\u4ee3\u308f\u308a\" target=\"_blank\">64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306eScriptControl\u306e\u4ee3\u308f\u308a<\/a>\u300d\u3067\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u300164\u30d3\u30c3\u30c8\u74b0\u5883\u3067ScriptControl\u3092\u5229\u7528\u3057\u3066URL\u30a8\u30f3\u30b3\u30fc\u30c9\u51e6\u7406\u3092\u884c\u304a\u3046\u3068\u3057\u305f\u5834\u5408\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3066\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093(<strong>64\u30d3\u30c3\u30c8OS\u4e0a\u306e32\u30d3\u30c3\u30c8\u7248Office(WOW64\u4e0a)\u3067\u306f\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u305b\u3093<\/strong>)\u3002<\/p>\n<p>\u3053\u308c\u306f\u300c<strong>msscript.ocx<\/strong>\u300d\u304c64\u30d3\u30c3\u30c8\u74b0\u5883\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u300c<a href=\"\/\/www.ka-net.org\/office\/of32.html\" title=\"64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306eScriptControl\u306e\u4ee3\u308f\u308a\" target=\"_blank\">64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306eScriptControl\u306e\u4ee3\u308f\u308a<\/a>\u300d\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b\u65b9\u6cd5\u3068\u306f\u9055\u3046\u65b9\u6cd5\u3067URL\u30a8\u30f3\u30b3\u30fc\u30c9\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<p><strong>[\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb]<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  MsgBox EncodeURLx64(&quot;\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a&quot;)\r\nEnd Sub\r\n\r\nPublic Function EncodeURLx64(ByVal str As String) As String\r\n  Dim s As String, com As String, ret As String\r\n  Dim ScriptFilePath As String, ExeFilePath As String\r\n  \r\n  ret = &quot;&quot; '\u521d\u671f\u5316\r\n  \r\n  '\u30b9\u30af\u30ea\u30d7\u30c8\u7528\u30b3\u30fc\u30c9\u8a2d\u5b9a\r\n  s = &quot;Option Explicit&quot; &amp; vbCrLf\r\n  s = s &amp; vbCrLf\r\n  s = s &amp; &quot;Dim Args, ret&quot; &amp; vbCrLf\r\n  s = s &amp; vbCrLf\r\n  s = s &amp; &quot;Set Args = WScript.Arguments&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;If Args.Count &lt; 1 Then WScript.Quit&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;With CreateObject(&quot;&quot;ScriptControl&quot;&quot;)&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;  .Language = &quot;&quot;JScript&quot;&quot;&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;  ret = .CodeObject.encodeURIComponent(Args(0))&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;End With&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;Set Args = Nothing&quot; &amp; vbCrLf\r\n  s = s &amp; &quot;WScript.Echo ret&quot;\r\n  \r\n  ScriptFilePath = VBA.Environ$(&quot;TEMP&quot;) &amp; &quot;\\enc.vbs&quot;\r\n  With CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\n    With .CreateTextFile(ScriptFilePath, True)\r\n      .Write s\r\n      .Close\r\n    End With\r\n    If .FileExists(ScriptFilePath) Then\r\n      ExeFilePath = .GetSpecialFolder(0).Path &amp; &quot;\\SysWOW64\\cscript.exe&quot;\r\n      If .FileExists(ExeFilePath) Then\r\n        com = ExeFilePath &amp; &quot; \/\/Nologo &quot;&quot;&quot; &amp; ScriptFilePath &amp; &quot;&quot;&quot; &quot;&quot;&quot; &amp; str &amp; &quot;&quot;&quot;&quot;\r\n        ret = CreateObject(&quot;WScript.Shell&quot;).Exec(com).StdOut.ReadAll\r\n      End If\r\n      .DeleteFile ScriptFilePath\r\n    End If\r\n  End With\r\n  EncodeURLx64 = ret\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18\u300c<strong>Sample<\/strong>\u300d\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001MsgBox\u3067URL\u30a8\u30f3\u30b3\u30fc\u30c9\u51e6\u7406\u3055\u308c\u305f\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL-300x114.jpg\" alt=\"\" title=\"EncodeURL\" width=\"300\" height=\"114\" class=\"alignnone size-medium wp-image-224\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL-300x114.jpg 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL-290x110.jpg 290w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL-150x57.jpg 150w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/EncodeURL.jpg 486w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u4e00\u6642\u7684\u306bVBScript\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u300132\u30d3\u30c3\u30c8\u7248\u306ecscript.exe\u3067\u305d\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001URL\u30a8\u30f3\u30b3\u30fc\u30c9\u51e6\u7406\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"2011\/12\/28 \u8ffd\u8a18\uff1a \u95a2\u9023\u8a18\u4e8b\u3068\u3057\u3066\u300c\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3057\u3066URL\u30a8\u30f3\u30b3\u30fc\u30c9\u3092\u884c\u3046\u300d\u3092\u66f8\u304d\u307e\u3057\u305f\u3002 \u300c64\u30d3\u30c3\u30c8\u74b0\u5883\u3067\u306eScriptControl\u306e\u4ee3\u308f\u308a\u300d\u3067\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u300164\u30d3\u30c3\u30c8\u74b0\u5883\u3067ScriptCon [&hellip;]","protected":false},"author":1,"featured_media":0,"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],"tags":[8,17,43],"class_list":["post-220","post","type-post","status-publish","format-standard","hentry","category-office","tag-vba","tag-scriptcontrol","tag-url"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-3y","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/220","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=220"}],"version-history":[{"count":9,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/220\/revisions"}],"predecessor-version":[{"id":1148,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/220\/revisions\/1148"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}