메인 컨텐츠로 가기

Outlook에서 폴더 이름으로 폴더 (전체 폴더 경로)를 찾는 방법은 무엇입니까?

예를 들어, 탐색 창에서 Outlook에서 실수로 폴더를 이동하고 알 수없는 폴더에 놓으면이 폴더를 복원하고 싶지만 즉시 찾을 수 없습니다. 안타깝게도 Outlook은 Find Microsoft Word 또는 Excel의 기능과 동일합니다. 걱정 하지마! Outlook에서이 문제를 해결하기 위해 VBA 매크로를 적용 할 수 있습니다.

놀라운 도구를 사용하여 폴더 이름으로 폴더를 빠르게 검색하고 엽니 다.

일반적으로 VBA 코드를 사용하여 폴더 이름으로 폴더를 검색 할 수 있습니다. 대부분의 VBA 코드는 현재 사서함의 폴더를 검색 할 수 있으며 처음 찾은 폴더 만 열 수 있습니다. 이제 Outlook 용 Kutools의 이동 기능을 사용하여 폴더 이름으로 폴더를 쉽게 찾고 필요한 폴더를 열 수 있습니다.



VBA를 사용하여 폴더 이름으로 폴더 (전체 폴더 경로) 찾기

Outlook에서 VBA를 사용하여 폴더 이름으로 폴더를 검색하려면 아래 단계를 따르십시오.

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

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭 한 다음 VBA 코드 아래에 새 모듈 창에 붙여 넣습니다.

VBA : Outlook에서 폴더 이름으로 폴더 검색 및 열기

Private m_Folder As MAPIFolder
Private m_Find As String
Private m_Wildcard As Boolean

Private Const SpeedUp As Boolean = True
Private Const StopAtFirstMatch As Boolean = True

Public Sub FindFolder()
Dim sName As String
Dim oFolders As Folders

  Set m_Folder = Nothing
m_Find = ""
m_Wildcard = False

  sName = InputBox("Find:", "Search folder")
If Len(Trim(sName)) = 0 Then Exit Sub
m_Find = sName

  m_Find = LCase(m_Find)
m_Find = Replace(m_Find, "%", "*")
m_Wildcard = (InStr(m_Find, "*"))

  Set oFolders = Application.Session.Folders
LoopFolders oFolders

  If Not m_Folder Is Nothing Then
If MsgBox("Activate folder: " & vbCrLf & m_Folder.FolderPath, vbQuestion Or vbYesNo) = vbYes Then
Set Application.ActiveExplorer.CurrentFolder = m_Folder
End If
Else
MsgBox "Not found", vbInformation
End If
End Sub

Private Sub LoopFolders(Folders As Outlook.Folders)
Dim oFolder As MAPIFolder
Dim bFound As Boolean

If SpeedUp = False Then DoEvents

  For Each oFolder In Folders
If m_Wildcard Then
bFound = (LCase(oFolder.Name) Like m_Find)
Else
bFound = (LCase(oFolder.Name) = m_Find)
End If

    If bFound Then
If StopAtFirstMatch = False Then
If MsgBox("Found: " & vbCrLf & oFolder.FolderPath & vbCrLf & vbCrLf & "Continue?", vbQuestion Or vbYesNo) = vbYes Then
bFound = False
End If
End If
End If
If bFound Then
Set m_Folder = oFolder
Exit For
Else
LoopFolders oFolder.Folders
If Not m_Folder Is Nothing Then Exit For
End If
Next
End Sub

3. 프레스 F5 키를 누르거나 달리기 버튼을 눌러이 VBA를 실행합니다.

4. 폴더 검색 대화 상자가 나타나면 검색 할 지정된 폴더 이름을 입력하고 OK 단추. 스크린 샷보기 :

주의 사항:이 VBA는 별표 와일드 카드를 지원합니다. 예를 들어 다음을 입력 할 수 있습니다. tes * 이름이로 시작하는 모든 폴더를 찾으려면 tes.

5. 이제 대화 상자가 나타나고 찾은 폴더의 폴더 경로를 보여줍니다. 찾은 폴더를 열려면 가능 버튼을 클릭합니다.

이제 아래 스크린 샷과 같이 탐색 창에서 찾은 폴더가 열립니다.

주의 사항: 지정된 이름으로 명명 된 폴더가 둘 이상있는 경우이 VBA는 하나의 폴더 만 찾아서 열 수 있습니다.


놀라운 도구로 폴더 이름으로 폴더 검색

Outlook 용 Kutools가 설치되어있는 경우 이동 기능을 적용하여 특정 폴더 이름으로 모든 폴더를 빠르게 찾고 발견 된 폴더를 누구나 쉽게 열 수 있습니다.

Outlook 용 Kutools: 100개 이상의 필수 도구로 Outlook을 강화하세요. 조건 없이 60일 동안 무료로 테스트해 보세요!   자세히보기 ...   지금 다운로드!

1. 딸깍 하는 소리 쿠툴즈 플러스 > 로 이동 이 기능을 사용하려면

2. 이동 대화 상자에서 지정된 폴더 이름을 입력하십시오. 검색 상자에서 검색 결과에서 폴더를 선택하고 Ok 버튼을 클릭합니다.

이제 특정 폴더 이름을 가진 지정된 폴더가 발견되고 즉시 열립니다.


관련 기사 :


최고의 사무 생산성 도구

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

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

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

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

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

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

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

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

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

 

 

Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you for this great macro. I have used it extensively over the past 2 years. My employer switched from Office 16 to Office 365 and since then, this macro is VERY slow. Is there any way to optimize it for Office 365?
Thanks!
This comment was minimized by the moderator on the site
This macro has really helped me is incredible, thank you!!!
Is it possible to to go to the next occurrence, so instead of just Yes/No have something as Yes/Next/No ?
Thank you
This comment was minimized by the moderator on the site
Private m_Folder As MAPIFolder
Private m_Find As String
Private m_Wildcard As Boolean

Private Const SpeedUp As Boolean = True
'Private Const StopAtFirstMatch As Boolean = True
Private StopAtFirstMatch As Boolean

Public Sub FindFolder()
Dim sName As String
Dim oFolders As Folders

Set m_Folder = Nothing
m_Find = ""
m_Wildcard = False

sName = InputBox("Find:", "Search folder")
If Len(Trim(sName)) = 0 Then Exit Sub

'm_Find = sName
' Added "*"... for any given string in the folder name
m_Find = "*" & sName & "*"

m_Find = LCase(m_Find)
m_Find = Replace(m_Find, "%", "*")
m_Wildcard = (InStr(m_Find, "*"))

' Set oFolders = Application.Session.Folders
Set oFolders = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders

LoopFolders oFolders

If Not m_Folder Is Nothing Then
' Removed - If MsgBox("Activate folder: " & vbCrLf & m_Folder.FolderPath, vbQuestion Or vbYesNo) = vbYes Then
Set Application.ActiveExplorer.CurrentFolder = m_Folder
Else
MsgBox "Search End...", vbInformation
End If
End Sub

Private Sub LoopFolders(Folders As Outlook.Folders)
Dim oFolder As MAPIFolder
Dim bFound As Boolean

If SpeedUp = False Then DoEvents

For Each oFolder In Folders
If m_Wildcard Then
bFound = (LCase(oFolder.Name) Like m_Find)
Else
bFound = (LCase(oFolder.Name) = m_Find)
End If


If bFound Then
If StopAtFirstMatch = False Then
Set Application.ActiveExplorer.CurrentFolder = oFolder

If MsgBox("Found: " & vbCrLf & oFolder.FolderPath & vbCrLf & vbCrLf & "Search for next?", vbQuestion Or vbYesNo) = vbYes Then
bFound = False
End If
Else
MsgBox ("Not found")
End If
End If
If bFound Then
Set m_Folder = oFolder
Exit For
Else
LoopFolders oFolder.Folders
If Not m_Folder Is Nothing Then Exit For
End If
Next
End Sub
This comment was minimized by the moderator on the site
Hi, if i try to copy and past the macro yes/next/no, I only received the message "Search End".
Could you take a look? I would really appreciate it. Thanks
This comment was minimized by the moderator on the site
Hi, if i try to copy and past the macro yes/next/no, I only received the message "Search End".Could you take a look? I would really appreciate it. Thanks
This comment was minimized by the moderator on the site
Wow this is exactly. I really appreciate it and you did it so fast.Thanks
This comment was minimized by the moderator on the site
Hello,

Thank you for this macro. It works great!


Is there a way to make the macro always search as wildcards? I would be easier to just type a keyword without adding the asterisks every time.
This comment was minimized by the moderator on the site
Replace Line 18 with

m_Find = "*" & sName & "*"
This comment was minimized by the moderator on the site
Replace Line 18 with
m_Find = "*" & sName & "*"
This comment was minimized by the moderator on the site
Hello.

Wow - this is an amazing function, which will make my daily usage of Outlook tons faster.
Thank you so much for publishing!!

A tip for those interested:
If you want to search only INBOX-folders, without public folders etc.
This made it a lot faster for me because the public folder are remote, so the search is quite slow.
And also I'm not interested in those results.


Replace line 24 with:

Set oFolders = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations