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.217  | #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
Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.
email  Send a message