Hi,
maybe like this:
Sub autoexec()
Application.OnTime _
When:=Now + TimeValue("00:00:01"), _
Name:="test"
End Sub
Sub test()
If Documents.Count = 0 Then
autoexec
End If
MsgBox "after autoexec"
' your code goes in here
End Sub
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"