People found the solution to my problem, maybe I was not very clear on the question, well follow what I did
Sub teste(Item As Outlook.MailItem)
Dim minTime, maxTime As String
minTime = "18:00:00"
maxTime = "05:00:00"
If Time() > minTime Or Time() < maxTime Then
MsgBox ("Funcionou")
End If
End Sub
Thank you very much