回答編集履歴
1
コードの修正
test
CHANGED
@@ -44,13 +44,15 @@
|
|
44
44
|
|
45
45
|
|
46
46
|
|
47
|
-
|
47
|
+
|
48
48
|
|
49
|
+
Dim mailSender As Object 'As Outlook.AddressEntry
|
50
|
+
|
49
|
-
Set
|
51
|
+
Set mailSender = iMail.Sender
|
50
52
|
|
51
53
|
|
52
54
|
|
53
|
-
If
|
55
|
+
If mailSender Is Nothing Then _
|
54
56
|
|
55
57
|
Exit Function 'return vbNullString
|
56
58
|
|
@@ -68,11 +70,11 @@
|
|
68
70
|
|
69
71
|
'Now we have an AddressEntry representing the Sender
|
70
72
|
|
71
|
-
Select Case
|
73
|
+
Select Case mailSender.AddressEntryUserType
|
72
74
|
|
73
|
-
Case
|
75
|
+
Case olExchangeUserAddressEntry, _
|
74
76
|
|
75
|
-
|
77
|
+
olExchangeRemoteUserAddressEntry
|
76
78
|
|
77
79
|
|
78
80
|
|
@@ -80,7 +82,7 @@
|
|
80
82
|
|
81
83
|
Dim exchUser As Object 'As Outlook.ExchangeUser
|
82
84
|
|
83
|
-
Set exchUser =
|
85
|
+
Set exchUser = mailSender.GetExchangeUser()
|
84
86
|
|
85
87
|
|
86
88
|
|
@@ -98,7 +100,7 @@
|
|
98
100
|
|
99
101
|
Let GetSenderSMTPAddress = _
|
100
102
|
|
101
|
-
|
103
|
+
CStr(mailSender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS))
|
102
104
|
|
103
105
|
|
104
106
|
|
@@ -108,6 +110,4 @@
|
|
108
110
|
|
109
111
|
End Function
|
110
112
|
|
111
|
-
|
112
|
-
|
113
113
|
```
|