PDA

View Full Version : Solved: How to delay macro for 30 sec in Outlook 2007



guatelize
05-13-2011, 04:02 AM
Hello

I'm looking a 30 seconds delay for this macro :

Private Sub Application_MAPILogonComplete()

TestAttachmentRule
End Sub

Thanks

JP2112
05-13-2011, 01:39 PM
How about this?

Private Sub Application_MAPILogonComplete()
Dim currenttime As Date

currenttime = Now
Do Until currenttime + TimeValue("00:00:30") <= Now
Loop

Call TestAttachmentRule
End Sub

guatelize
05-17-2011, 12:49 AM
Thanks, works as wished.
Have a good day