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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]Email Worksheet[/b]

Status
Not open for further replies.

trystanhuwwilliams1

Programmer
Jan 7, 2003
44
0
0
GB
Hello there,

I can email a worksheet from an excel workbook by choosing Send to - Mail Recipient which then gives you a choice of either sending the entire workbook or just the current sheet as the email body, which is fine, but how can I do this in code?

Thank you for any assistance,

T
 
Go Straight to Ron De Bruins site, where you will find the excellent free addin Sendmail, as well as all the code behind it, with numerous examples of how to manipulate Excel sheets/books/ranges etc within email.


Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
[blue].sendmail[/blue] may work for you. That's the simplest method to send a workbook. It does have limitations, however: you can only use it to send workbooks, not individual sheets; You can't insert any body text, just a subject.

Arguments follow:

[blue]activeworkbook.sendmail recipients, subject, return receipt[/blue]

Hope that helps,
John
 
Thanks for everyone's help & contribution but eventually I discovered the following command works fine.

However the solution was a little bit easier for me because I can assume the presence of 'Outlook' and I don't have to attach a name to the recipient.


CommandBars("Send To").Controls("Mail Recipient").Execute

Cheers,
Trystan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top