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: 52.204  | #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
Reporter Reporter
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month.
email  Send a message