Hi
I'd like to pause a Winword macro until a specific time. I tried something
like
Application.Wait Now + TimeValue("00:00:10")
and it came with the compilation error "Method or data member not found".
Is it only for Excel?
Besides, this seems to be a busy wait which blocks the PC, which I have to
avoid, because it will run on a Terminal Server.
Why "Application.Wait" doesn't work and what is a better way to build a
delay in the code?
TIA
Alex
Helmut Weber - 15 Nov 2005 15:53 GMT
Hi Alex,
there is no wait method for, at least Word 2003.
See (one line):
http://groups.google.de/group/microsoft.public.word.vba.general/browse_frm/threa
d/2da3ec34d799084b/c65fff652f61f0d8?lnk=st&q=wait+sleep+group:microsoft.public.w
ord.vba*+author:helmut+author:weber&rnum=2&hl=de#c65fff652f61f0d8
http://groups.google.de/group/microsoft.public.word.vba.userforms/browse_frm/thr
ead/8f61fdba80b62014/7796586a79857a6a?lnk=st&q=wait+sleep+group:microsoft.public
.word.vba*+author:helmut+author:weber&rnum=1&hl=de#7796586a79857a6a

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Tony Jollans - 15 Nov 2005 15:55 GMT
Application.Wait is Excel.
In Word you can use Application.OnTime to fire a procedure at a given time.
With appropriate flags and jumps you could arrange to make it act like a
delay.
--
Enjoy,
Tony
> Hi
>
[quoted text clipped - 15 lines]
>
> Alex
Alex - 15 Nov 2005 20:57 GMT
Thanks Helmut and Tony.
Sleep "kernel32" seems OK.
As to Application.OnTime , I was under the impression it is a busy wait,
but i'll check again.
Anyway, many thanks to both of you.
Alex