모든 하위 폴더 및 항목이있는 Outlook 폴더를 Windows 폴더로 빠르게 내보내는 방법

지금 공유 :

때때로 모든 하위 폴더와 항목이있는 Outlook 폴더를 Windows 폴더로 일괄 내보낼 수 있습니다. 이 기사에서는 Outlook VBA를 적용하는 방법에 대해 설명합니다.

Outlook 폴더를 동일한 폴더 구조의 모든 항목이있는 로컬 드라이브로 내보내려는 경우 수동으로 저장 및 내보내기를 선택하면 많은 시간이 걸립니다. 따라서 내보내기 도구 또는 VBA 코드와 같은 다른 방법을 사용하지 않는 이유는 무엇입니까? 여기서 우리는 그러한 VBA 코드를 여러분에게 공개 할 것입니다. 그것은 당신이 산들 바람처럼 그것을 성취하도록 허락 할 것입니다.

Outlook 폴더의 모든 하위 폴더 및 항목을 Windows 폴더로 빠르게 내보내기

Outlook 폴더의 모든 하위 폴더 및 항목을 Windows 폴더로 내보내기

  1. 처음에는 start Outlook 프로그램.
  2. 그런 다음 기본 Outlook 창에서 "Alt + F11"키 바로 가기를 누릅니다.
  3. 그러면 "Microsoft Visual Basic for Applications"창이 나타납니다.
  4. 다음으로 빈 모듈을 열고 다음 VBA 코드를 복사해야합니다.
Private objFileSystem As Object
 
Private Sub ExportFolderWithAllItems()
    Dim objFolder As Outlook.Folder
    Dim strPath As String
 
    'Specify the root local folder
    'Change it as per your needs
    strPath = "E:\Outlook\"
 
    Set objFileSystem = CreateObject("Scripting.FileSystemObject")
 
    'Select a Outlook PST file or Outlook folder
    Set objFolder = Outlook.Application.Session.PickFolder
 
    Call ProcessFolders(objFolder, strPath)
 
    MsgBox "Complete", vbExclamation
End Sub
 
Private Sub ProcessFolders(objCurrentFolder As Outlook.Folder, strCurrentPath As String)
    Dim objItem As Object
    Dim strSubject, strFileName, strFilePath As String
    Dim objSubfolder As Outlook.Folder
 
    'Create the local folder based on the Outlook folder
    strCurrentPath = strCurrentPath & objCurrentFolder.Name
    objFileSystem.CreateFolder strCurrentPath
 
    For Each objItem In objCurrentFolder.Items
 
        strSubject = objItem.Subject
 
        'Remove unsupported characters in the subject
        strSubject = Replace(strSubject, "/", " ")
        strSubject = Replace(strSubject, "\", " ")
        strSubject = Replace(strSubject, ":", "")
        strSubject = Replace(strSubject, "?", " ")
        strSubject = Replace(strSubject, Chr(34), " ")

        strFileName = strSubject & ".msg"
 
        i = 0
        Do Until False
           strFilePath = strCurrentPath & "\" & strFileName
           'Check if there exist a file in the same name
           If objFileSystem.FileExists(strFilePath) Then
              'Add a sequence order to the file name
              i = i + 1
              strFileName = strSubject & " (" & i & ").msg"
           Else
              Exit Do
          End If
        Loop
 
        'Save as MSG file
        objItem.SaveAs strFilePath, olMSG
    Next
 
    'Process subfolders recursively
    If objCurrentFolder.folders.Count > 0 Then
       For Each objSubfolder In objCurrentFolder.folders
           Call ProcessFolders(objSubfolder, strCurrentPath & "\")
       Next
    End If
End Sub

VBA 코드-Outlook 폴더의 모든 하위 폴더 및 항목을 Windows 폴더로 내보내기

  1. 그런 다음 Outlook이 매크로 설정에서 매크로를 허용하는지 확인해야합니다.
  2. 결국 시도해 볼 수 있습니다.
  • 먼저 새 매크로 창으로 돌아갑니다.
  • 다음으로 "ExportFolderWithAllItems"서브 루틴을 클릭하십시오.
  • 그런 다음 F5 키 버튼을 눌러이 매크로를 실행합니다.
  • 그런 다음 특정 폴더를 선택해야합니다.특정 Outlook 폴더 선택
  • 마지막으로 "완료"라는 메시지가 표시되면 미리 정의 된 로컬 폴더에 액세스 할 수 있습니다. 모든 항목이 동일한 폴더 구조에 저장되었음을 알 수 있습니다.효과 : Windows 폴더

Outlook 충돌로 인한 데이터 손실 방지

아마도 당신은 많은 Outlook 충돌을 경험했을 것입니다. 미디엄ost 시간, 입술 후tart, Outlook은 정상적으로 작동 할 수 있습니다. 그러나 PST 파일이 손상되는 경우도 있습니다. 이때 다음과 같은 숙련 된 도구로 되풀이되는 것과 같이 PST 데이터를 검색하기 위해 최선을 다할 것입니다. DataNumen Outlook Repair. 할 수있다 Outlook 수정 오류를 일으키지 않고 손상된 PST 파일에서 데이터를 추출합니다.

저자 소개 :

Shirley Zhang은 데이터 복구 전문가입니다. DataNumen, Inc.는 다음과 같은 데이터 복구 기술 분야의 세계적 리더입니다. SQL Server 수리 및 전망 수리 소프트웨어 제품. 자세한 내용은 WWW.datanumen.COM

지금 공유 :

댓글이 닫혀있다.