Outlook 데이터 파일의 폴더 구조를 Excel 통합 문서로 빠르게 내보내려면이 문서에서 소개 한 방법을 사용할 수 있습니다.
현재 Outlook 폴더 및 하위 폴더를 기록하는 것과 같은 몇 가지 이유로 많은 사용자는 Outlook 파일의 폴더 구조를 Excel 통합 문서와 같은 외부 파일로 내보내려고합니다. 다음에서는 VBA 코드를 공유하여 순식간에이를 달성 할 수 있습니다.

Outlook 파일의 폴더 구조를 Excel로 내보내기
- 에tar함께 Outlook 응용 프로그램을 시작하십시오.
- 그런 다음 기본 Outlook 창에서 "Alt + F11"키 버튼을 누릅니다.
- 다음으로 사용하지 않는 모듈을 열어야하는 Outlook VBA 편집기로 이동합니다.
- 이후에 다음 VBA 코드를이 모듈에 복사 할 수 있습니다.
Dim objExcelApp As Excel.Application
Dim objExcelWorkbook As Excel.Workbook
Dim objExcelWorksheet As Excel.Worksheet
Dim lMainFolder As Long
Sub ExportFolderStructureToExcel()
Dim objSourcePSTFile As Folder
'Add a new Excel workbook
Set objExcelApp = CreateObject("Excel.Application")
Set objExcelWorkbook = objExcelApp.Workbooks.Add
Set objExcelWorksheet = objExcelWorkbook.Sheets(1)
With objExcelWorksheet
.Cells(1, 1) = "Folder Structure"
.Cells(1, 1).Font.Size = 14
.Cells(1, 1).Font.Bold = True
End With
'Select an Outlook PST file
Set objSourcePSTFile = Application.Session.PickFolder
lMainFolder = Len(objSourcePSTFile.FolderPath) - Len(Replace(objSourcePSTFile.FolderPath, "\", "")) + 1
Call ExportToExcel(objSourcePSTFile.FolderPath, objSourcePSTFile.Name)
Call ProcessFolders(objSourcePSTFile.Folders)
'Save this Excel workbook
objExcelWorksheet.Columns("A").AutoFit
strExcelFile = "E:\Folder Structure (" & Format(Now, "yyyymmddhhmmss") & ").xlsx"
objExcelWorkbook.Close True, strExcelFile
MsgBox "Complete!", vbExclamation
End Sub
Sub ProcessFolders(ByVal objFolders As Folders)
Dim objFolder As Folder
'Process all folders recursively
For Each objFolder In objFolders
If objFolder.Name <> "Conversation Action Settings" And objFolder.Name <> "Quick Step Settings" Then
Call ExportToExcel(objFolder.FolderPath, objFolder.Name)
Call ProcessFolders(objFolder.Folders)
End If
Next
End Sub
Sub ExportToExcel(ByRef strFolderPath As String, strFolderName As String)
Dim i, n As Long
Dim strPrefix As String
Dim nLastRow As Integer
i = Len(strFolderPath) - Len(Replace(strFolderPath, "\", ""))
For n = lMainFolder To i
strPrefix = strPrefix & "-"
Next
strFolderName = strPrefix & strFolderName
'Input the folder name in Excel
nLastRow = objExcelWorksheet.Range("A" & objExcelWorksheet.Rows.Count).End(xlUp).Row + 1
objExcelWorksheet.Range("A" & nLastRow) = strFolderName
End Sub
- 그런 다음 Outlook에서 매크로를 활성화했는지 확인해야합니다.
- 결국 다음과 같이 촬영할 수 있습니다.
- 현재 매크로 창에서 F5 키 버튼을 누릅니다.
- 매크로가 완료되면 "완료"라는 경고가 표시됩니다.
- 나중에 미리 정의 된 로컬 폴더로 이동하여 새 Excel 파일을 찾을 수 있습니다. 그것을 열면 다음 스크린 샷과 같이 보일 것입니다.
Outlook 오류를 무시하지 마십시오
많은 기능에도 불구하고 Outlook은 다른 이메일 클라이언트와 마찬가지로 오류와 손상에 취약합니다. 따라서 Outlook의 모든 오류를 중요하게 생각해야합니다. 그들을 무시하지 마십시오. 그렇지 않으면 누적 오류가 결국 Outlook 손상으로 이어질 수 있습니다. 매듭 오류가 발생하면 다음과 같은 강력한 도구를 사용하는 것이 좋습니다. DataNumen Outlook Repair, 이는 수 수리 Outlook 몇 초 안에 오류.
저자 소개 :
Shirley Zhang은 데이터 복구 전문가입니다. DataNumen, Inc.는 다음과 같은 데이터 복구 기술 분야의 세계적 리더입니다. SQL 복구 및 전망 수리 소프트웨어 제품. 자세한 내용은 WWW.datanumen.COM

