은 당신이 사용중인 Outlook의 버전을 잘 모르겠지만, 마이크로 소프트 (http://msdn.microsoft.com/en-us/library/office/aa211006(v=office.11).aspx)에 따라 당신은받는 사람을 얻기 위해 .Recipients (인덱스)를 사용합니다. 거기에서 주소를 얻을 수 있습니다. 필자는 Outlook 2000 (eww)을 참조했지만 ResolveAll 메서드를 .Recipients에 첨부 한 것을 언급했습니다.
Dim myItem As Outlook.MailItem
Dim myRecipient as String
Set myItem = Application.CreateItem(olMailItem)
Set myRecipient = myItem.Recipients.Item(0).Address
이 당신에게 처음받는 사람의 주소를 (당신이 IndexOutOfRange 1로 변경을 얻는 경우 VBA는, 인덱스 0 또는 1로 시작하면 내가 기억할 수없는주의) 줄 것이다 일을보십시오. 다른 사람들이 필요하다면, 당신은 루프를 할 필요가있을 것입니다. 이 같은 것을 :
For Each Recipient in myItem.Recipients
// do some stuff here
Next Recipient
희망이 있습니다.
Sub BuildTable1()
Dim oEmail As Outlook.MailItem
Set oEmail = Application.ActiveInspector.currentItem
Set xlApp = CreateObject("Excel.Application")
xlApp.Application.Visible = True
xlApp.workbooks.Open FileName:= file location
xlApp.WorkSheets("Contacts").Activate
xlApp.Range("A6").Value = oEmail.To
//filtering by value, copying, pasting, etc.
End Sub
-ZL :
Sub CheckAddresses()
Dim oEmail As Outlook.MailItem
Dim r As Recipient
Dim rList As Recipients
Set oEmail = Application.ActiveInspector.CurrentItem
Set rList = oEmail.Recipients
rList.ResolveAll
For Each r In rList
Debug.Print r.Address
Next
End Sub
고맙습니다. 나는 약간의 용도 변경을하면서이 방법을 사용할 수있게되었다. – GZL