{"id":1006,"date":"2022-08-16T07:31:41","date_gmt":"2022-08-15T22:31:41","guid":{"rendered":"https:\/\/beiyan-tool.info\/?p=1006"},"modified":"2022-08-16T07:31:41","modified_gmt":"2022-08-15T22:31:41","slug":"excel-vba%e3%81%a7sendusingaccount%e3%81%8c%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ab%e3%81%aa%e3%82%8b%e3%80%81%e3%82%a2%e3%82%ab%e3%82%a6%e3%83%b3%e3%83%88%e3%81%8c%e5%88%87%e3%82%8a%e6%9b%bf%e3%82%8f","status":"publish","type":"post","link":"https:\/\/beiyan-tool.info\/?p=1006","title":{"rendered":"Excel VBA\u3067SendUsingAccount\u304c\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u5207\u308a\u66ff\u308f\u3089\u306a\u3044\u554f\u984c\u306e\u5bfe\u51e6\u6cd5"},"content":{"rendered":"<p>Excel VBA\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u3001SendUsingAccount\u306b\u9001\u4fe1\u5143\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u691c\u7d22\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u52d5\u4f5c\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u5b9f\u969b\u306b\u3042\u308b\u7a0b\u5ea6\u52d5\u4f5c\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3060\u3001\u5171\u6709\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u3066\u3044\u305f\u308a\u3059\u308b\u3068\u3001\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u5207\u308a\u66ff\u308f\u3089\u305a\u3001\u30e1\u30a4\u30f3\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30e1\u30fc\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"lang:vb decode:true \" >    Dim objOutlook As Object\r\n    Dim objMail As Object\r\n    \r\n    objOutlook = CreateObject(\"Outlook.Application\")\r\n    Set objMail = objOutlook.CreateItem(0)\r\n    \r\n    With objMail\r\n    \r\n        .SendUsingAccount = objOutlook.Session.Accounts.Item(\"[\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9]\")\r\n         .Subject = \"[\u4ef6\u540d]\"\r\n        \r\n        .Body = \"[\u672c\u6587]\"\r\n        .To = \"[\u9001\u4fe1\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9]\"\r\n        .Attachments.Add ([\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9])\r\n        \r\n        '\u30e1\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u3066\u8868\u793a\u3059\u308b\u5834\u5408\u3000.Display\r\n        '\u4e0b\u66f8\u304d\u306b\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3000.Close (0)\r\n        '\u305d\u306e\u307e\u307e\u9001\u4fe1\u3059\u308b\u5834\u5408\u3000.Send\r\n\r\n    End With<\/pre>\n<p>SentOnBehalfOfName \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u306e\u3067<br \/>\n\u5171\u6709\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u306e\u554f\u984c\u304b\u3068\u601d\u3044\u3001\u4e00\u65e6\u8ae6\u3081\u304b\u3051\u307e\u3057\u305f\u304c\u3001<br \/>\n\u300cSendUsingAccount VBA not working\u300d\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u3067\u691c\u7d22\u3057\u3066\u3044\u305f\u3068\u3053\u308d\u3001<br \/>\n\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u308c\u3070\u52d5\u4f5c\u3059\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<div class=\"redbox\">.SendUsingAccount = objOutlook.Session.Accounts.Item(&#8220;[\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9]&#8221;)<br \/>\n\u2193<br \/>\nSet .SendUsingAccount = objOutlook.Session.Accounts.Item(&#8220;[\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9]&#8221;)<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Excel VBA\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3092\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u3001SendUsingAccount\u306b\u9001\u4fe1\u5143\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u691c\u7d22\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u30b3\u30fc &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1006","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/1006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1006"}],"version-history":[{"count":2,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/1006\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=\/wp\/v2\/posts\/1006\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beiyan-tool.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}