
Sending email via Outlook from word 97/2000
'Lo All,
I am using code derived from code posted on MVPS :
http://www.*-*-*.com/
My code will send multiple emails to an address taken from the contents of
multiple word documents (one email per document).
The code works if I have Outlook running before I run the macro. However if
the macro opens Outlook itself (because Outlook isn't already running) not
all of the emails are sent all the time, sometimes all are sent sometimes
only one and any combination between. When Outlook is ran manually any
emails that weren't sent are then sent.
Any suggestions as to how to ensure Outlook sends all the emails? Looks
like a timing issue, is there any way to check Outlook has sent the previous
email before queueing another?
P.S. Is there some sort of pause/sleep/wait command in VBA.
--
Jonathan Leckie, Please remove the Z in my email address to reply