Sending an email in outlook via automation

J

Jim Plante

How can I tell when outlook is done sending an email message ?
After calling the .Send Method (ie. oMailItem.Send) what can I do to tell
when its done so I can close down outlook (obj.outlook.quit) and quit my
application ?
 
D

Dick Kusleika

Jim

I haven't tried it, but maybe this

Do While
olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderOutbox).Items.Count > 0
Loop

olApp.Quit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top