Ed,
If you want to use a plain timer in your code you can use the following code
as an example. (Only for Word 2000 and later)
------------------------------------------------------
' Win API declarations
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
Public hTimer As Long
Dim nCount As Long
Sub StartTimer()
Dim nMilliSec As Long
nMilliSec = 1000 ' set timer events to 1 second
hTimer = SetTimer(0, 0, nMilliSec, AddressOf TimerProc)
End Sub
Sub StopTimer()
KillTimer 0, hTimer
End Sub
Sub TimerProc()
nCount = nCount + 1
If nCount > 10 Then StopTimer
Selection.TypeText Now()
Selection.TypeParagraph
End Sub
----------------------------------------------
--
Regards,
Lars-Eric Gisslén
ED said:
Can you get the Timer control to work in VBA in Office XP? I have tried
turning on References and Additional Controls but it won't come up in the
ToolBox.