VBOffice

Pause Code Execution

In Excel there's a function to stop the code execution for a determined time, which is missing in Outlook. See how to use the Sleep function of the Win32 API.

Last modified: 2007/07/20 | Accessed: 53.908  | #56
◀ Previous sample Next sample ▶

In Excel there's a function to stop the code execution for a determined time, in Outlook there isn't such a function. But you can use the Sleep function of the Win32 API, of course.


tip  How to add macros to Outlook
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliSeconds As Long)

Public Sub Test()
  Sleep 3000
  MsgBox "Hello"
End Sub
SAM SAM
Determine the "identity" of your emails. Set with SAM the sender and the folder folder for sent items with the help of rules.
email  Send a message