This question is done (and solved) before, see Outlook VBA - Run a code every half an hour I used the code fore several years on with no trouble on several computers running Vista (32 bit), Windows 7 and Windows 8.1 (all 64 bit). A new computer with a new office 2010 installation gives some problems.
The 64 bit version of outlook seems to react different as the 32 bit version. I get errors with these lines
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerfunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
This can be corrected with PtrSafe like:
Declare Function PtrSafe SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerfunc As Long) As Long
Declare Function PtrSafe KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
An other error appear in the line:
TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer)
The types seem to be different.
AddressOf
? it would help if you tell us the error message and code – user2140173