메인 컨텐츠로 가기

Outlook을 시작할 때 모든 폴더를 자동으로 확장하는 방법은 무엇입니까?

일반적으로 Outlook의 탐색 창에서 폴더를 확장하거나 축소한 후 프로그램을 닫으면 Outlook을 다시 열 때 폴더는 확장 또는 축소된 상태를 유지합니다. 그러나 Outlook을 시작할 때마다 모든 폴더가 자동으로 확장되도록 하려면 어떻게 해야 합니까? 이 문서에서는 이를 달성하기 위한 VBA 솔루션을 제공합니다.

VBA를 사용하여 Outlook을 시작할 때 모든 폴더를 자동으로 확장합니다.

Office 탭 - Microsoft Office에서 탭 편집 및 탐색을 활성화하여 작업을 원활하게 만듭니다.
Outlook용 Kutools - 탁월한 효율성을 위한 100개 이상의 고급 기능으로 Outlook 향상
이러한 고급 기능으로 Outlook 2021~2010 또는 Outlook 365를 향상하세요. 포괄적인 60일 무료 평가판을 즐기고 이메일 경험을 향상시키십시오!

화살표 블루 오른쪽 거품 VBA를 사용하여 Outlook을 시작할 때 모든 폴더를 자동으로 확장합니다.

이 가이드에서는 Outlook을 시작할 때마다 VBA 스크립트를 사용하여 탐색 창의 모든 폴더를 자동으로 확장하는 방법을 보여줍니다. VBA 스크립트를 구현하려면 다음 단계를 따르세요.

  1. PR 기사 Alt + F11 동시에 열려면 키 응용 프로그램 용 Microsoft Visual Basic 창.
  2. 확장 프로젝트 1Microsoft Outlook 개체 FBI 증오 범죄 보고서 프로젝트 창에서 두 번 클릭하여 엽니다. ThisOutlook세션 창에 아래 VBA 코드를 붙여넣습니다.

    VBA : Outlook의 모든 폴더 자동 확장

    Public WithEvents GEx As Explorer
    Public GFlag As Boolean
    Private Sub Application_Startup()
      'Update by ExtendOffice 2023/12/08
      Set GEx = Application.ActiveExplorer
      GFlag = False
    End Sub
    
    Private Sub GEx_SelectionChange()
      If GFlag = False Then
        ExpandAllFolders
      End If
      GFlag = True
    End Sub
    
    Public Sub ExpandAllFolders()
      Dim xNameSpace As Outlook.NameSpace
      Dim xFlds As Outlook.Folders
      Dim xCurrFld As Outlook.MAPIFolder
      Dim xFld As Outlook.MAPIFolder
      Dim xExpandDefaultStoreOnly As Boolean
      Dim xModule As NavigationModule
      On Error Resume Next
      xExpandDefaultStoreOnly = False
      Set xNameSpace = Application.Session
      Set xModule = Application.ActiveExplorer.NavigationPane.CurrentModule
      Set xCurrFld = Application.ActiveExplorer.CurrentFolder
      If xExpandDefaultStoreOnly = True Then
        Set xFld = xNameSpace.GetDefaultFolder(olFolderInbox)
        Set xFld = xFld.Parent
        Set xFlds = xFld.Folders
        LoopFolders xFlds, True
      Else
        LoopFolders xNameSpace.Folders, True
        LoopFolders xNameSpace.Folders, False
      End If
      DoEvents
      Set Application.ActiveExplorer.NavigationPane.CurrentModule = xModule
      Set Application.ActiveExplorer.CurrentFolder = xCurrFld
      Set xNameSpace = Nothing
      Set xModule = Nothing
      Set xCurrFld = Nothing
    End Sub
    
    Private Sub LoopFolders(Flds As Outlook.Folders, ByVal All As Boolean)
      Dim xFld As Outlook.MAPIFolder
      On Error Resume Next
      For Each xFld In Flds
        Select Case All
          Case True
            If xFld.DefaultItemType = olMailItem Then
              Set Application.ActiveExplorer.CurrentFolder = xFld
              DoEvents
              If xFld.Folders.Count > 0 Then
                LoopFolders xFld.Folders, All
              End If
            End If
          Case False
            Set Application.ActiveExplorer.CurrentFolder = xFld
            DoEvents
            If xFld.Folders.Count > 0 Then
              LoopFolders xFld.Folders, All
            End If
        End Select
      Next
    End Sub
  3. 코드를 저장하고 닫으세요. 응용 프로그램 용 Microsoft Visual Basic 창.

이제부터 Outlook을 다시 시작하면 모든 폴더가 Outlook에서 자동으로 확장됩니다.

배송 시 요청 사항:

  • 이 VBA는 Outlook을 다시 시작할 때 축소된 검색 폴더를 열 수 없습니다.
  • VBA 스크립트가 올바르게 작동하도록 하려면 Outlook에서 매크로 설정을 조정하는 것이 중요합니다. 다음으로 이동하세요. 입양 부모로서의 귀하의 적합성을 결정하기 위해 미국 이민국에 > 옵션 > 보안 센터 > 보안 센터 설정 > 매크로 설정, 모든 매크로 사용 옵션. 이 설정을 사용하면 VBA 스크립트를 제한 없이 실행할 수 있습니다.

화살표 블루 오른쪽 거품 관련 기사


최고의 사무 생산성 도구

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

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

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

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

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

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

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

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

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

 

 

Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Just tried this on Microsoft® Outlook® for Microsoft 365 MSO (Version 2310 Build 16.0.16924.20054) 64-bit and it was unsuccessful
This comment was minimized by the moderator on the site
Hi there,

Please go to File > Options > Trust Center > Trust Center Settings > Macro Settings. And select the Enable all macros option. After making this change, restart Outlook, the macro should then be operational.
This comment was minimized by the moderator on the site
Hi guys,

does this code also work for Microsoft outlook 365?
I have tried and tried again, but I get no results.
Thanks.
This comment was minimized by the moderator on the site
I couldn't get this macro to work either.
This comment was minimized by the moderator on the site
Hi there,
We've updated the code, please try it again. 🙂
Amanda
This comment was minimized by the moderator on the site
I cannot get this macro to work at all.  All folders in the Folder pane are not expanded at all.  I am using Outlook 2021.  Is there some instruction I missed?
This comment was minimized by the moderator on the site
Hi there,
We've updated the code, please try it again. 🙂
Amanda
This comment was minimized by the moderator on the site
Thank you so much.. It solved my problem. :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations