답변:
나는이 질문을 사이트와 인터넷의 다른 곳에서 검색했으며 쉽게 대답 할 수 없었으므로 직접 코드를 작성했습니다. 이것을 달성하려는 다음 사람을 위해 여기에 :
Option Explicit
Public Sub Today()
Dim myFolder As Folder
Set myFolder = GetInboxSubFolder("* 0. Today")
If Not myFolder Is Nothing Then
MoveItemAndMarkAsUnread myFolder
End If
End Sub
Private Function GetInboxSubFolder(folderName As String) As Folder
Dim myNamespace As NameSpace
Dim myInbox As Folder
Set myNamespace = Application.GetNamespace("MAPI")
Set myInbox = myNamespace.GetDefaultFolder(olFolderInbox)
Set GetInboxSubFolder = myInbox.Folders(folderName)
End Function
Private Sub MoveItemAndMarkAsUnread(myFolder As Folder)
Dim myExplorer As Explorer
Dim mySelection As Selection
Set myExplorer = Application.ActiveExplorer
Set mySelection = myExplorer.Selection
Dim i As Integer
Dim myItem As MailItem
For i = mySelection.Count To 1 Step -1
mySelection.Item(i).UnRead = True
mySelection.Item(i).Move myFolder
Next i
End Sub
누군가에게 유용한 희망