1
Eae guys, I need to do a macro in MS Outlook that only run in a certain time range, there is some function that helps me with this??
I saw that in Excel there is Ontime(), but it seems that in Outlook there is not the same.
1
Eae guys, I need to do a macro in MS Outlook that only run in a certain time range, there is some function that helps me with this??
I saw that in Excel there is Ontime(), but it seems that in Outlook there is not the same.
1
People found the solution to my problem, maybe I was not very clear in 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
Browser other questions tagged vba microsoft
You are not signed in. Login or sign up in order to post.
I don’t know the nuances of VBA in Outlook. But, at least it should be possible to use the native Windows timer. Take a look here: http://www.cpearson.com/excel/OnTime.aspx (the text is facing Excel, but the last part about Windows Timers should be useful to you).
– Luiz Vieira