MailEnvelope

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having some problems with sending an e-mail using VBA in Excel.
- I only want to send some text as the e-mail message but in addition to the
text the entire worksheet is being sent.
- Even though the e-mail message is sent automatically, my Excel application
shows the E-mail header with the To, CC, Subject, and Introduction fields and
a toolbar where I can push the Send This Sheet button. I can't cancel this
(because there is no Don't Send This Sheet button) and if I push the Send
This Sheet button then it sends a second copy of the message.
- My code sends several different e-mails to different recipients by looping
through all the rows in the worksheet until all desired e-mails have been
sent (each row of the worksheet contains the required information like the To
and Subject etc for 1 e-mail message). But while the first e-mail is being
sent, the loop continues executing (ie, it doesn't pause until the first
e-mail is sent) and so when I try to execute the command
ActiveCell.Offset(1,0).Select I get an error because Excel doesn't have the
focus (the e-mail message has the focus) and so the ActiveCell isn't
understood.
I'd appreciate any suggestions.
Thanks
 
I've fought with emailing from excel and have found that the best and most
fool proof way is to use a product like "PDF redirect Pro" to print the
sheets to uniquely named disk files while record the name of the files in
the rows of the list used to drive the emails.

Then loop through the list and send an email message and attach the proper
PDF file to the proper recipient.

PDF redirect Pro installs a PDF printer on your PC and then you print to it
and pass the name of the file to be created without having the prompt that
comes up from normal PDF writers.

What email object are you using in the vba code. Some of them are a pain.

regards
Steve Moland
 
Back
Top