Public Sub SaveAsTXT()
Dim msg As MailItem
Dim exp As Explorer
Dim path As String
Dim folder As String
Dim dt As String
Set exp = Application.ActiveExplorer
folder = "C:\Users\yzhen22\R9\"
For Each msg In exp.Selection
dt = Format(msg.ReceivedTime, "yyyy-mm-dd")
msg.SaveAs folder & dt & ".txt", olTXT
Next
End Sub