{"id":1909,"date":"2012-07-06T15:51:21","date_gmt":"2012-07-06T06:51:21","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=1909"},"modified":"2014-01-22T16:27:08","modified_gmt":"2014-01-22T07:27:08","slug":"%e5%a4%96%e9%83%a8%e3%81%8b%e3%82%89outlook%e3%81%ae%e3%83%9e%e3%82%af%e3%83%ad%e3%82%92%e5%ae%9f%e8%a1%8c%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=1909","title":{"rendered":"\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed"},"content":{"rendered":"<p>\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed<\/p>\n<p>\u4eca\u56de\u306f\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n\u300c<a href=\"http:\/\/support.microsoft.com\/kb\/221827\/ja\" title=\"Ol 2000: VBScript \u304b\u3089 VBA \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u547c\u3073\u51fa\u3059\" target=\"_blank\">Ol 2000: VBScript \u304b\u3089 VBA \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u547c\u3073\u51fa\u3059<\/a>\u300d\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u65b9\u6cd5\u3082\u3042\u308b\u306e\u3067\u3059\u304c\u30012010\u306e\u5834\u5408\u306f\u4e0a\u624b\u304f\u52d5\u4f5c\u3057\u306a\u304b\u3063\u305f\u306e\u3067\u5225\u306e\u65b9\u6cd5\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  'RunOutlookMacro &quot;SampleModProc&quot; '\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\r\n  RunOutlookMacro &quot;Project1.ThisOutlookSession.SampleTosProc&quot; 'ThisOutlookSession\r\nEnd Sub\r\n\r\nPublic Sub RunOutlookMacro(ByVal MacroName As String)\r\n  If CreateObject(&quot;WbemScripting.SWbemLocator&quot;).ConnectServer.ExecQuery _\r\n     (&quot;Select * From Win32_Process Where Name = 'OUTLOOK.EXE'&quot;).Count &lt; 1 Then\r\n    Shell &quot;OUTLOOK.EXE&quot;\r\n  End If\r\n  With CreateObject(&quot;Outlook.Application&quot;)\r\n    With .ActiveExplorer.CommandBars(&quot;Standard&quot;).Controls.Add(Type:=1, Temporary:=True)\r\n      .OnAction = MacroName\r\n      .Execute\r\n      .Delete\r\n    End With\r\n    .Quit\r\n  End With\r\nEnd Sub<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u306f&#8221;<span style=\"color: #ff0000; font-weight: bold;\">Standard<\/span>&#8220;\u30c4\u30fc\u30eb\u30d0\u30fc\u306b\u4e00\u6642\u7684(Temporary:=True)\u306b\u6307\u5b9a\u3057\u305f\u30de\u30af\u30ed\u3092\u547c\u3073\u51fa\u3059\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u3066\u3001\u5916\u90e8\u304b\u3089\u305d\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u5b9f\u884c(Execute)\u3059\u308b\u4ed5\u7d44\u307f\u3092\u53d6\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001Outlook\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u8a2d\u5b9a\u3067\u30de\u30af\u30ed\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u524d\u63d0\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u304c\u3001\u4f7f\u3044\u52dd\u624b\u306f\u305d\u308c\u306a\u308a\u306b\u826f\u3044\u3060\u308d\u3046\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n(&#8220;\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b&#8221;\u9700\u8981\u304c\u3042\u308b\u306e\u304b\u3069\u3046\u304b\u306f\u5225\u306b\u3057\u3066\u2026)<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2012\/07\/13 \u8ffd\u8a18\uff1a<\/span><br \/>\nautorun\u30b9\u30a4\u30c3\u30c1\u304c\u3042\u308b\u3053\u3068\u3092\u77e5\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u30b9\u30a4\u30c3\u30c1\u3092\u4f7f\u3063\u305f\u30b3\u30fc\u30c9\u3082\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  'RunOutlookMacro &quot;SampleModProc&quot; '\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\r\n  RunOutlookMacro &quot;Project1.ThisOutlookSession.SampleTosProc&quot; 'ThisOutlookSession\r\nEnd Sub\r\n\r\nPublic Sub RunOutlookMacro(ByVal MacroName As String)\r\n  Shell &quot;OUTLOOK.EXE \/autorun &quot;&quot;&quot; &amp; MacroName &amp; &quot;&quot;&quot;&quot;\r\nEnd Sub<\/pre>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2014\/01\/22 \u8ffd\u8a18\uff1a<\/span><\/p>\n<h4>\u25a0 \u5f15\u6570\u4ed8\u304d\u3067\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408<\/h4>\n<p>\u901a\u5e38\u306f\u300c<a href=\"http:\/\/www.moug.net\/tech\/exvba\/0080029.html\" title=\"Excel VBA \u3092\u5b66\u3076\u306a\u3089 moug \u30e2\u30fc\u30b0 | \u5373\u52b9\u30c6\u30af\u30cb\u30c3\u30af | OnAction\u3067\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306b\u5f15\u6570\u3092\u6e21\u3059\" target=\"_blank\">OnAction\u3067\u5b9f\u884c\u3059\u308b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306b\u5f15\u6570\u3092\u6e21\u3059<\/a>\u300d\u306b\u3042\u308b\u3088\u3046\u306a\u65b9\u6cd5\u3067OnAction\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u5f15\u6570\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001Outlook\u306e\u5834\u5408\u306f\u4f55\u6545\u304b\u4e0a\u624b\u304f\u884c\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5f15\u6570\u4ed8\u304d\u3067\u547c\u3073\u51fa\u3059\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306bActionControl\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089CommandBarControl\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3057\u3001Parameter\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5229\u7528\u3057\u3066\u5f15\u6570\u3092\u6e21\u3059\u306e\u304c\u826f\u3044\u3060\u308d\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><strong>\u30fbOutlook\u5074<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub SampleModProc()\r\n  Dim msg As String\r\n  \r\n  msg = ActiveExplorer.CommandBars.ActionControl.Parameter\r\n  MsgBox msg, vbSystemModal\r\nEnd Sub<\/pre>\n<p><strong>\u30fb\u547c\u3073\u51fa\u3057\u5074<\/strong><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  RunOutlookMacro &quot;SampleModProc&quot;, &quot;Hello!!&quot;\r\nEnd Sub\r\n\r\nPublic Sub RunOutlookMacro(ByVal MacroName As String, Optional ByVal Arg As String = &quot;&quot;)\r\n  If CreateObject(&quot;WbemScripting.SWbemLocator&quot;).ConnectServer.ExecQuery _\r\n     (&quot;Select * From Win32_Process Where Name = 'OUTLOOK.EXE'&quot;).Count &lt; 1 Then\r\n    Shell &quot;OUTLOOK.EXE&quot;\r\n  End If\r\n  With CreateObject(&quot;Outlook.Application&quot;)\r\n    With .ActiveExplorer.CommandBars(&quot;Standard&quot;).Controls.Add(Type:=1, Temporary:=True)\r\n      .OnAction = MacroName\r\n      If Len(Trim(Arg)) &gt; 0 Then .Parameter = Arg\r\n      .Execute\r\n      .Delete\r\n    End With\r\n    .Quit\r\n  End With\r\nEnd Sub<\/pre>\n<p><strong>\u25a0 \u95a2\u9023Web\u30da\u30fc\u30b8<\/strong><\/p>\n<p>\u30fbOl 2000: VBScript \u304b\u3089 VBA \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u547c\u3073\u51fa\u3059<br \/>\n<a href=\"http:\/\/support.microsoft.com\/kb\/221827\/ja\" title=\"Ol 2000: VBScript \u304b\u3089 VBA \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u547c\u3073\u51fa\u3059\" target=\"_blank\">http:\/\/support.microsoft.com\/kb\/221827\/ja<\/a><br \/>\n\u30fb\u5225\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089 Outlook \u3092\u81ea\u52d5\u5316\u3059\u308b\u65b9\u6cd5<br \/>\n<a href=\"http:\/\/support.microsoft.com\/kb\/201096\/ja\" title=\"\u5225\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089 Outlook \u3092\u81ea\u52d5\u5316\u3059\u308b\u65b9\u6cd5\" target=\"_blank\">http:\/\/support.microsoft.com\/kb\/201096\/ja<\/a><br \/>\n\u30fbOffice Space: Microsoft Outlook \u304c\u65e2\u306b\u5b9f\u884c\u4e2d\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306b\u95a2\u4fc2\u306a\u304f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5\u3059\u308b<br \/>\n<a href=\"http:\/\/gallery.technet.microsoft.com\/office\/cd88e4e2-e45f-4d43-b19e-9ace3486b295\" title=\"Office Space: Microsoft Outlook \u304c\u65e2\u306b\u5b9f\u884c\u4e2d\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u306b\u95a2\u4fc2\u306a\u304f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5\u3059\u308b\" target=\"_blank\">http:\/\/gallery.technet.microsoft.com\/office\/cd88e4e2-e45f-4d43-b19e-9ace3486b295<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed \u4eca\u56de\u306f\u5916\u90e8\u304b\u3089Outlook\u306e\u30de\u30af\u30ed\u3092\u5b9f\u884c\u3059\u308b\u30de\u30af\u30ed\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u300cOl 2000: VBScript \u304b\u3089 VBA \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u547c\u3073\u51fa\u3059\u300d\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u65b9\u6cd5\u3082\u3042\u308b\u306e [&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,68],"tags":[63,65,69],"class_list":["post-1909","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","category-outlook","tag-excel","tag-word","tag-outlook-vba"],"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-uN","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1909","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=1909"}],"version-history":[{"count":10,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1909\/revisions"}],"predecessor-version":[{"id":3947,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1909\/revisions\/3947"}],"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=1909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}