Outlook 항목의 색상 범주를 바꾸려면 새 범주가 할당 될 때 원래 범주를 제거해야합니다. 따라서이 기사에서는 VBA를 통해이를 자동화하는 방법을 설명합니다.
Outlook에서 색상 범주를 사용하는 주된 이유는 Outlook 항목을 더 잘 분류하고 관리하기 위해서입니다. 또한 Outlook에서는 하나의 항목에 하나 이상의 색상 범주를 할당 할 수 있습니다. 그러나 단일 항목에 너무 많은 범주가 할당되면 때때로 분류 규칙이 복잡해질 수 있습니다. 따라서 많은 사용자가 카테고리를 오버레이하는 대신 색상 카테고리를 바꾸고 싶어합니다. 여기서 우리는 당신에게 효과적인 방법을 공개 할 것입니다.

Outlook 항목의 색 범주 바꾸기
- 처음에는 Outlook 응용 프로그램을 시작하십시오.
- 그런 다음 "개발자"탭으로 전환하고 "Visual Basic"버튼을 클릭하거나 "Alt + F11"키 단축키를 누릅니다.
- 다음으로 "Microsoft Visual Basic for Applications"창으로 들어갑니다.
- 이 시점에서 왼쪽에있는 "ThisOutlookSession"프로젝트를 두 번 클릭하여 열어야합니다.
- 그런 다음이 프로젝트 창에 다음 VBA 코드를 복사합니다.
Public WithEvents objExplorer As Outlook.Explorer
Public WithEvents objInspectors As Outlook.Inspectors
'Take Mailitem as an example
Public WithEvents objMail As Outlook.MailItem
Private Sub Application_Startup()
Set objExplorer = Outlook.Application.ActiveExplorer
Set objInspectors = Outlook.Application.Inspectors
End Sub
Private Sub objExplorer_Activate()
On Error Resume Next
Set objMail = objExplorer.Selection.Item(1)
End Sub
Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
Set objMail = Inspector.CurrentItem
End Sub
Private Sub objMail_PropertyChange(ByVal Name As String)
Dim strSpecificCategory As String
Dim strCategories As String
Dim varArray As Variant
Dim i As Long
If Name = "Categories" Then
strCategories = objMail.Categories
varArray = Split(objMail.Categories, ",")
If UBound(varArray) >= 1 Then
'If want to get a confirmation before removing the original category
'Add the following lines
'Dim strPrompt As String
'Dim nResponse As Integer
'strPrompt = "Do you want to remove the original color category?"
'nResponse = MsgBox(strPrompt, vbQuestion + vbYesNo, "Color Category Assignment")
'If nResponse = vbYes Then
For i = 0 To UBound(varArray)
'Remove the previous color categories
varArray(1) = ""
'Rebuild the categories
objMail.Categories = Join(varArray, ",")
Exit Sub
Next i
'End If
End If
End If
End Sub
- 그런 다음이 새 매크로에 디지털 인증서를 할당해야합니다.
- 나중에 Outlook 매크로 설정을 확인하여 서명 된 매크로가 활성화되었는지 확인해야합니다.
- 결국 당신은 res해야tart Outlook에서 새 VBA 프로젝트를 활성화합니다.
- 이제부터는 항목에 새 범주를 할당 할 때마다 이전 범주가 자동으로 제거됩니다.
Nettlesome Outlook 문제 처리
Outlook은 오류 및 손상이 발생하기 쉬우므로 Outlook에서 다양한 문제가 발생합니다. 그러므로 충분히 조심 스러워야합니다. 예를 들어 PST 파일을 정기적으로 백업하는 것이 좋습니다. 더욱이, 당신은 강력한 PST 수정 도구, 같은 DataNumen Outlook Repair.
저자 소개 :
Shirley Zhang은 데이터 복구 전문가입니다. DataNumen, Inc.는 다음과 같은 데이터 복구 기술 분야의 세계적 리더입니다. 복구 Sql Server 및 전망 수리 소프트웨어 제품. 자세한 내용은 WWW.datanumen.COM
