{"id":11788,"date":"2019-06-18T15:00:10","date_gmt":"2019-06-18T06:00:10","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=11788"},"modified":"2019-06-19T16:01:17","modified_gmt":"2019-06-19T07:01:17","slug":"%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%a2%e3%83%89%e3%83%ac%e3%82%b9%e3%81%8b%e3%82%89exchangeuser%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8boutlook%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=11788","title":{"rendered":"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3089ExchangeUser\u3092\u53d6\u5f97\u3059\u308bOutlook\u30de\u30af\u30ed"},"content":{"rendered":"<p><a href=\"https:\/\/www.moug.net\/\" title=\"Excel VBA \u3092\u5b66\u3076\u306a\u3089 moug \u30e2\u30fc\u30b0\" target=\"_blank\" rel=\"noopener noreferrer\">moug<\/a>\u306b<i>\u201c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u30ad\u30fc\u3068\u3057\u3066Exchange\u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30c9\u30ec\u30b9\u4e00\u89a7\u3092\u691c\u7d22\u3057\u3001\u540d\u524d\u3084\u90e8\u7f72\u540d\u3092\u53d6\u5f97\u3057\u305f\u3044\u201d<\/i>\u3068\u306e\u8cea\u554f(<a href=\"https:\/\/www.moug.net\/faq\/viewtopic.php?t=78288\" title=\"Excel VBA \u3092\u5b66\u3076\u306a\u3089 moug \u30e2\u30fc\u30b0\uff5cExcel \uff08VBA\uff09\uff5cExcelVBA\u304b\u3089OUTLOOK\u306eExchange \u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30c9\u30ec\u30b9\u4e00\u89a7\u3092\u691c\u7d22\u3059\u308b\u30b3\u30fc\u30c9\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.moug.net\/faq\/viewtopic.php?t=78288<\/a>)\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u56de\u7b54\u7528\u306b\u66f8\u3044\u305f\u306e\u304c\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u3001moug\u306e\u30ed\u30b0\u304c\u6d41\u308c\u3066\u3057\u307e\u3046\u524d\u306b\u30e1\u30e2\u3068\u3057\u3066\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2019\/6\/19 \u8ffd\u8a18\uff1a<\/span><br \/>\n\u3044\u307f\u3072\u3068(<a href=\"https:\/\/twitter.com\/nukie_53\" title=\"\u3044\u307f\u3072\u3068(@nukie_53)\u3055\u3093\" target=\"_blank\" rel=\"noopener noreferrer\">@nukie_53<\/a>)\u3055\u3093\u304b\u3089\u8fd4\u4fe1\u3092\u3044\u305f\u3060\u3044\u3066\u30b3\u30fc\u30c9\u3092\u4e00\u90e8\u5909\u66f4\u3002<br \/>\n\u95a2\u6570\u540d\u306f\u300cBy\u300d\u306e\u65b9\u304c\u5206\u304b\u308a\u3084\u3059\u305d\u3046\uff01\u3064\u3044\u3067\u306bAddressEntryUserType\u306e\u5224\u5b9a\u51e6\u7406\u3082\u5909\u66f4\u3002<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"ja\">\n<p lang=\"ja\" dir=\"ltr\">GetGlobalAddressList\u306e\u5b58\u5728\u3092\u77e5\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u52d5\u3051\u3070\u3044\u3044\u3001\u3068\u3044\u3046\u65b9\u6cd5\u3067\u3059\u3002<br \/>\u7528\u9014\u3068\u3057\u3066\u3001\u8907\u6570\u306e\u30a2\u30c9\u30ec\u30b9\u304b\u3089ExchangeUser\u3092\u53d6\u5f97\u3057\u305f\u304b\u3063\u305f\u305f\u3081\u3001\u4f5c\u696d\u7528\u306e\u30e1\u30fc\u30eb\u4f5c\u6210\u30b3\u30b9\u30c8\u304c\u76f8\u5bfe\u7684\u306b\u4f4e\u304b\u3063\u305f\u3001\u3068\u3044\u3046\u306e\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u500b\u4eba\u74b0\u5883\u306a\u306e\u3067\u52d5\u4f5c\u78ba\u8a8d\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u753b\u50cf\u306e\u3088\u3046\u306a\u96f0\u56f2\u6c17\u3067\u3059\u3002 <a href=\"https:\/\/t.co\/DWEsuV1U1a\">pic.twitter.com\/DWEsuV1U1a<\/a><\/p>\n<p>&mdash; \u3044\u307f\u3072\u3068 (@nukie_53) <a href=\"https:\/\/twitter.com\/nukie_53\/status\/1141112948892397568?ref_src=twsrc%5Etfw\">2019\u5e746\u670818\u65e5<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Public Sub Sample()\r\n  Dim eu As Outlook.ExchangeUser\r\n   \r\n  Set eu = GetExchangeUserByAddress(&quot;hoge@hogepomehoge.onmicrosoft.com&quot;)\r\n  If Not eu Is Nothing Then\r\n    Debug.Print eu.Name, eu.Department, eu.PrimarySmtpAddress\r\n  End If\r\nEnd Sub\r\n \r\nPrivate Function GetExchangeUserByAddress(ByVal SmtpAddress As String) As Outlook.ExchangeUser\r\n  Dim myList As Outlook.AddressList\r\n  Dim ae As Outlook.AddressEntry\r\n  Dim eu As Outlook.ExchangeUser\r\n  Dim ret As Outlook.ExchangeUser\r\n   \r\n  Set myList = Application.Session.GetGlobalAddressList\r\n  For Each ae In myList.AddressEntries\r\n    Select Case ae.AddressEntryUserType\r\n      Case olExchangeUserAddressEntry, olExchangeRemoteUserAddressEntry '\u74b0\u5883\u306b\u5fdc\u3058\u3066\u5909\u66f4\r\n        Set eu = ae.GetExchangeUser\r\n        If eu.PrimarySmtpAddress = SmtpAddress Then\r\n          Set ret = eu\r\n          Exit For\r\n        End If\r\n    End Select\r\n  Next\r\n  Set GetExchangeUserByAddress = ret\r\nEnd Function<\/pre>\n<p>\u51e6\u7406\u306e\u6d41\u308c\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>GetGlobalAddressList\u30e1\u30bd\u30c3\u30c9\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30c9\u30ec\u30b9\u4e00\u89a7\u3092\u8868\u3059AddressList\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3002<\/li>\n<li>AddressEntries\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089AddressEntries(\u30b3\u30ec\u30af\u30b7\u30e7\u30f3)\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3002<\/li>\n<li>For Each\u6587\u3067\u9806\u6b21AddressEntry\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3002<\/li>\n<li>AddressEntryUserType\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3088\u308b\u5224\u5b9a\u3002<\/li>\n<li>GetExchangeUser\u30e1\u30bd\u30c3\u30c9\u3067ExchangeUser\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3002<\/li>\n<li>PrimarySmtpAddress\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u6307\u5b9a\u3057\u305f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3069\u3046\u304b\u3092\u5224\u65ad\u3002<\/li>\n<li>\u4e00\u81f4\u3057\u305f\u5834\u5408ExchangeUser\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u3002<\/li>\n<\/ol>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"moug\u306b\u201c\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u30ad\u30fc\u3068\u3057\u3066Exchange\u30b0\u30ed\u30fc\u30d0\u30eb\u30a2\u30c9\u30ec\u30b9\u4e00\u89a7\u3092\u691c\u7d22\u3057\u3001\u540d\u524d\u3084\u90e8\u7f72\u540d\u3092\u53d6\u5f97\u3057\u305f\u3044\u201d\u3068\u306e\u8cea\u554f(https:\/\/www.moug.net\/faq\/viewtopic.php?t=78288)\u304c\u3042 [&hellip;]","protected":false},"author":1,"featured_media":7124,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304b\u3089ExchangeUser\u3092\u53d6\u5f97\u3059\u308bOutlook\u30de\u30af\u30ed]","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":[4,68],"tags":[],"class_list":["post-11788","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-outlook"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Outlook.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-348","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11788","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=11788"}],"version-history":[{"count":4,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11788\/revisions"}],"predecessor-version":[{"id":11792,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/11788\/revisions\/11792"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7124"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}