Skip to main content

아웃룩에서 하나 또는 여러 이메일로부터 발신자의 이메일 주소를 어떻게 가져올 수 있나요?

Author: Siluvia Last Modified: 2025-08-06

아웃룩에서 받은 한 개 이상의 이메일 "보낸 사람" 필드에서 이메일 주소를 추출해 본 적이 있나요? 이 기사에서는 이를 처리하는 데 도움을 줄 VBA 코드를 제공합니다.


아웃룩에서 하나 또는 여러 이메일로부터 발신자의 이메일 주소 가져오기

다음 VBA 코드를 실행하여 아웃룩에서 받은 한 개 이상의 이메일 "보낸 사람" 필드에서 이메일 주소를 추출하세요.

1. 이메일 폴더를 열고, 발신자의 이메일 주소를 가져오려는 이메일 메시지를 선택하세요. Alt + F11 키를 눌러 Microsoft Visual Basic for Applications 창을 엽니다.

참고: 여러 이메일을 선택하려면 Ctrl 키를 누른 상태로 이메일을 하나씩 선택하세요.

2. Microsoft Visual Basic for Applications 창에서 삽입 > 모듈을 클릭한 다음, 다음 VBA 코드를 모듈(코드) 창에 복사하세요.

steps on getting the sender’s email address from one or more emails in Outlook

VBA 코드: 아웃룩에서 하나 또는 여러 이메일로부터 발신자의 이메일 주소 추출하기

Sub GetSmtpAddressOfSelectionEmail()
  Dim xExplorer As Explorer
  Dim xSelection As Selection
  Dim xItem As Object
  Dim xMail As MailItem
  Dim xAddress As String
  Dim xFldObj As Object
  Dim FilePath As String
  Dim xFSO As Scripting.FileSystemObject
  On Error Resume Next
  Set xExplorer = Application.ActiveExplorer
  Set xSelection = xExplorer.Selection
  For Each xItem In xSelection
    If xItem.Class = olMail Then
      Set xMail = xItem
      xAddress = xAddress & VBA.vbCrLf & "  " & GetSmtpAddress(xMail)
    End If
  Next
  If MsgBox("Sender SMTP Address is: " & xAddress & vbCrLf & vbCrLf & "Do you want to export the address list to a txt file? ", vbYesNo, "Kutools for Outlook") = vbYes Then
    Set xFldObj = CreateObject("Shell.Application").BrowseforFolder(0, "Select a Folder", 0, 16)
    Set xFSO = New Scripting.FileSystemObject
    If xFldObj Is Nothing Then Exit Sub
    FilePath = xFldObj.Items.Item.Path & "\Address.txt"
    Close #1
    Open FilePath For Output As #1
    Print #1, "Sender SMTP Address is: " & xAddress
    Close #1
    Set xFSO = Nothing
    Set xFldObj = Nothing
    MsgBox "Address list has been exported to:" & FilePath, vbOKOnly + vbInformation, "Kutools for Outlook"
  End If
End Sub
Function GetSmtpAddress(Mail As MailItem)
  Dim xNameSpace As Outlook.NameSpace
  Dim xEntryID As String
  Dim xAddressEntry As AddressEntry
  Dim PR_SENT_REPRESENTING_ENTRYID As String
  Dim PR_SMTP_ADDRESS As String
  Dim xExchangeUser As exchangeUser
  On Error Resume Next
  GetSmtpAddress = ""
  Set xNameSpace = Application.Session
  If Mail.sender.Type <> "EX" Then
    GetSmtpAddress = Mail.sender.Address
  Else
    PR_SENT_REPRESENTING_ENTRYID = "http://schemas.microsoft.com/mapi/proptag/0x00410102"
    xEntryID = Mail.PropertyAccessor.BinaryToString(Mail.PropertyAccessor.GetProperty(PR_SENT_REPRESENTING_ENTRYID))
    Set xAddressEntry = xNameSpace.GetAddressEntryFromID(xEntryID)
    If xAddressEntry Is Nothing Then Exit Function
    If xAddressEntry.AddressEntryUserType = olExchangeUserAddressEntry Or xAddressEntry.AddressEntryUserType = olExchangeRemoteUserAddressEntry Then
      Set xExchangeUser = xAddressEntry.GetExchangeUser()
      If xExchangeUser Is Nothing Then Exit Function
      GetSmtpAddress = xExchangeUser.PrimarySmtpAddress
    Else
      PR_SMTP_ADDRESS = "http://schemas.microsoft.com/mapi/proptag/0x39FE001E"
      GetSmtpAddress = xAddressEntry.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS)
    End If
  End If
End Function

3. 도구 > 참조를 클릭하고, 참조 – Project1 대화 상자에서 Microsoft Scripting Runtime 항목을 체크하세요.

steps on getting the sender’s email address from one or more emails in Outlook

4. F5 키를 눌러 코드를 실행합니다. 그러면 Kutools for Outlook 대화 상자가 나타나며, 선택된 이메일들의 모든 발신자 이메일 주소가 나열됩니다.

참고:

주소록을 txt 파일로 내보내야 하는 경우, 버튼을 클릭하세요.
또는 아니요 버튼을 클릭하여 프로세스를 종료하세요.
steps on getting the sender’s email address from one or more emails in Outlook

5. 버튼을 클릭한 후, 폴더 찾아보기 대화 상자가 나타납니다. 파일을 저장할 폴더를 선택하고 확인 버튼을 클릭하세요.

steps on getting the sender’s email address from one or more emails in Outlook

6. 마지막으로, Kutools for Outlook 대화 상자가 나타나 내보낸 파일의 경로를 알려줍니다. 확인을 클릭하여 닫으세요.

steps on getting the sender’s email address from one or more emails in Outlook

7. 내보낸 파일이 저장된 폴더로 이동하여 Address라는 이름의 .txt 파일을 열어 선택된 이메일들의 발신자 이메일 주소를 확인하세요.

steps on getting the sender’s email address from one or more emails in Outlook

최고의 오피스 생산성 도구

속보: Kutools for Outlook 무료 버전 출시!

100개 이상의 놀라운 기능을 갖춘 완전히 새로워진 Kutools for Outlook을 경험해 보세요! 지금 다운로드하세요!

🤖 Kutools AI : 첨단 AI 기술을 활용하여 이메일 회신, 요약, 최적화, 확장, 번역, 작성까지 어떤 작업도 손쉽게 처리합니다.

📧 이메일 자동화: 자동 응답(POP 및 IMAP 지원) / 이메일 예약 발송 / 메일 발송 시 규칙에 따라 자동 참조/숨은 참조 / 고급 규칙 기반 자동 전달 / 자동 인사말 추가 / 여러 수신자 이메일을 개별 이메일로 자동 분할 ...

📨 이메일 관리: 이메일 회수 / 제목 등으로 스팸 이메일 차단 / 중복된 이메일 삭제 / 고급 검색 / 폴더 정리 ...

📁 첨부 파일 Pro: 일괄 저장 / 일괄 분리 / 일괄 압축 / 자동 저장 / 자동 분리 / 자동 압축 ...

🌟 인터페이스 매직: 😊더 예쁘고 멋진 이모지 / 중요한 이메일 도착 시 알림 / 종료 대신 Outlook 최소화 ...

👍 원클릭 편의 기능: 모두 회신(첨부 파일 포함) / 피싱 방지 이메일 / 🕘보낸 사람의 시간대 표시 ...

👩🏼‍🤝‍👩🏻 연락처 & 캘린더: 선택한 이메일에서 연락처 일괄 추가 / 연락처 그룹을 개별 그룹으로 분리 / 생일 알림 제거 ...

원하는 언어로 Kutools를 사용할 수 있습니다 – 영어, 스페인어, 독일어, 프랑스어, 중국어 등40개 이상의 언어 지원!

한 번의 클릭으로 Kutools for Outlook을 즉시 활성화하세요. 기다리지 말고, 지금 다운로드하여 효율성을 높이세요!

kutools for outlook features1 kutools for outlook features2