메인 컨텐츠로 가기

Outlook 이메일을 하드 드라이브 / 디스크에 자동으로 저장하는 방법은 무엇입니까?

백업, 작업 증거 또는 기타 목적을 위해 Outlook 이메일을 하드 드라이브에 저장할 수 있습니다. Outlook에서 디스크로 수동으로 드래그하여 여러 이메일을 디스크에 쉽게 저장할 수 있습니다. 그러나 각 수신 이메일을 디스크에 자동으로 저장하는 방법을 알고 있습니까? 이 기사에서는 Outlook에서 처리하는 VBA를 소개합니다.

Outlook 이메일을 하드 드라이브 / 디스크에 자동 저장


Outlook 이메일을 하드 드라이브 / 디스크에 자동 저장

이 방법은 Outlook의 모든 수신 이메일을 개별 HTML 파일로 특정 디스크에 자동으로 저장하는 VBA를 도입합니다. 다음과 같이하십시오 :

1. 프레스 다른 + F11 키를 눌러 Microsoft Visual Basic for Applications 창을 엽니 다.

2. Project1을 확장하고 두 번 클릭합니다. ThisOutlook세션 열어서 VBA 코드 아래에 ThisOutlookSession 창에 붙여 넣습니다. 스크린 샷보기 :

VBA : Outlook 이메일을 HTML 파일로 디스크에 자동 저장

Private WithEvents InboxItems As Outlook.Items
Sub Application_Startup()
Dim xNameSpace As Outlook.NameSpace
Set xNameSpace = Outlook.Application.Session
Set InboxItems = xNameSpace.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub InboxItems_ItemAdd(ByVal objItem As Object)
Dim FSO
Dim xMailItem As Outlook.MailItem
Dim xFilePath As String
Dim xRegEx
Dim xFileName As String
On Error Resume Next
xFilePath = CreateObject("WScript.Shell").SpecialFolders(16)
xFilePath = xFilePath & "\MyEmails"
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FolderExists(xFilePath) = False Then
FSO.CreateFolder (xFilePath)
End If
Set xRegEx = CreateObject("vbscript.regexp")
xRegEx.Global = True
xRegEx.IgnoreCase = False
xRegEx.Pattern = "\||\/|\<|\>|""|:|\*|\\|\?"
If objItem.Class = olMail Then
Set xMailItem = objItem
xFileName = xRegEx.Replace(xMailItem.Subject, "")
xMailItem.SaveAs xFilePath & "\" & xFileName & ".html", olHTML
End If
Exit Sub
End Sub

3. VBA 코드를 저장하고 Microsoft Outlook을 다시 시작하십시오.

이제부터 수신되는 각 이메일은 "MyEmails" 폴더에 개별 HTML 파일로 저장됩니다.

노트:
(1) 이 VBA는 문서 폴더 아래에 "MyEmails"라는 폴더를 생성합니다. 다음 폴더 경로를 사용하여 자동으로 저장된 이메일을 찾을 수 있습니다. C:\Users\사용자_이름\Documents\MyEmails
(2) 이 VBA는 기본 이메일 계정의 받은 편지함 폴더에 수신된 이메일과 함께 작동합니다.


관련 기사


최고의 사무 생산성 도구

Outlook 용 Kutools - 귀하의 전망을 강화하는 100개 이상의 강력한 기능

🤖 AI 메일 도우미: AI 마법이 적용된 즉각적인 전문가 이메일 - 원클릭으로 천재적인 답변, 완벽한 어조, 다국어 숙달이 가능합니다. 손쉽게 이메일을 변환하세요! ...

📧 이메일 자동화: 부재중(POP 및 IMAP에서 사용 가능)  /  이메일 보내기 예약  /  이메일 발송 시 규칙에 따른 자동 참조/숨은참조  /  자동 전달(고급 규칙)   /  인사말 자동 추가   /  여러 수신자 이메일을 개별 메시지로 자동 분할 ...

📨 이메일 관리: 이메일을 쉽게 기억할 수 있습니다.  /  제목 및 기타 사기 이메일 차단  /  중복 이메일 삭제  /  고급 검색  /  폴더 통합 ...

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

🌟 인터페이스 매직: 😊더 예쁘고 멋진 이모티콘   /  탭 보기로 Outlook 생산성 향상  /  문을 닫는 대신 전망을 최소화하세요 ...

???? 원클릭 불가사의: 수신 첨부 파일과 함께 전체 회신  /   피싱 방지 이메일  /  🕘발신자의 시간대 표시 ...

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

이상 100 특징 당신의 탐험을 기다려주세요! 더 알아보려면 여기를 클릭하세요.

 

 

Comments (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I need to change the folder for one i created (no need folder inbox), and i need to change the folder to store the msg files, in my case in drive e:., thank!!!
This comment was minimized by the moderator on the site
Can i have a certain report that is emailed to me each week save to a place on my hard drive? Just this one email. Comes from same email address and has the same title each week.
This comment was minimized by the moderator on the site
Could you advise how to change this to another folder, not the Inbox?
This comment was minimized by the moderator on the site
Dzień doby, robię wszystko tak jak opisane powyżej, mimo to makro nie chce działać. Czy muszę włączyć jakieś opcję albo zmienić coś w kodzie?
Nie wywala błędu jednak nie tworzy się folder a plik się nie zapisuje.

Będę bardzo wdzięczna za odpowiedź

Pozdrawiam serdecznie
This comment was minimized by the moderator on the site
How can I add the sender's email address to the file name?
This comment was minimized by the moderator on the site
Buonasera, è possibile modificare questo script con una versione che prevede di spostare i messaggi che arrivano in altra cartella anzichè quella classica della posta in arrivo? In altri termini, vorrei salvare automaticamente le mail che arrivano per esempio in Posta in Arrivo\Cliente1
grazie per la collaborazione
max
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations