Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

progress bar during email send--Help

Status
Not open for further replies.

fugly

Technical User
Mar 21, 2002
29
US
Help,

I am working on an VB6 app that uses Word 2K to send emails using the Mail Merge to Email method. How do I get the my form send (frmSend) to show a progess bar while the emails are being sent?

Here's What I got.... Addoc is the word document

frmSend.Show 'Tells user email are being sent

addoc.MailMerge.Destination = wdSendToEmail
addoc.MailMerge.MailAddressFieldName = "pe_email"
addoc.MailMerge.MailSubject = subject
addoc.MailMerge.SuppressBlankLines = True
addoc.MailMerge.MailAsAttachment = False
addoc.MailMerge.DataSource.FirstRecord = wdDefaultFirstRecord
addoc.MailMerge.DataSource.LastRecord = wdDefaultLastRecord
addoc.MailMerge.Execute Pause:=False

frmSend.Hide
Unload frmSend


Thanks
 
problem with what you want is that VB has no idea what step word is in once you do
addoc.MailMerge.Execute Pause:=False
Now to display a status bar you on the VB side you would have to automate Word a lot more and send each record from your app to word. For the sake of a progress bar I'm not sure it is worth it.
What I might do instead is throw up a small form that just has an animation on it and inform the user that the operation may take a while.

 
SemperFiDownUnda,

So if I changed this addoc.MailMerge.Execute Pause:=False

to addoc.MailMerge.Execute Pause:=True

How would that effect my app and would I gain anything by doing so?

I see what you mean by the animation. Since right now, I have nothing to count as it goes through the database to use to update a progress bar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top