E-mailing the active worksheet

G

GrahamB

I want to create a macro which sends JUST the active worksheet to a
pre-defined e-mail address (e.g. "(e-mail address removed)") but instead of
just immediately sending it as the Mail_Worksheet sub want to do, I want it
to open up the Outlook dialogue box with the active worksheet inserted as an
attachment so that the sender can add a message prior to clicking 'send'.

Just to make it more awkward, the active worksheet contains several
'VLookups' which reference sheets (2) and (3) which will not be emailed but
the eventual recipient of the email must nevertheless see the values. I'm a
beginner and this is too hard for me I'm afraid. Any ideas for a code ?
 
R

Ron de Bruin

Hi GrahamB

See
http://www.rondebruin.nl/sendmail.htm

Or use the add-in on that page

In the outlook object model examples you can use Display instead of Send in the code.
But if you use the SendMail examples it is only possible to not fill in the e-mail address if you want to see the mail.
Just to make it more awkward, the active worksheet contains several
'VLookups' which reference sheets (2) and (3) which will not be emailed but
the eventual recipient of the email must nevertheless see the values

There is code in the subs that you can use to convert the sheet to values
 
B

Bell.Sean.M

Hi GrahamB

Seehttp://www.rondebruin.nl/sendmail.htm

Or use the add-in on that page

In the outlook object model examples you can use Display instead of Send in the code.
But if you use the SendMail examples it is only possible to not fill in the e-mail address if you want to see the mail.


There is code in the subs that you can use to convert the sheet to values
Wow, sending mail via CDO sounds pretty neat - something I might want
to do to get my worksheets into Gmail quickly! (Or maybe I can track
down an add in that uses the gmail api...

Back on the subject at hand, it is possible that when you copy the
sheet you want to send via email it will add external links to the
sheets you are not sending that will cache their data. Make sure you
have absolute references to sheets 2 and 3 and not something indirect
so that it will catch them as links to you original full file. Your
recipients will get the annoying "Do you want to update links?" Dialog
most likely, and they cannot update seeing as they don't have your
original file, but it should work nicely!

-Sean


Thanks for the interesting
 
G

GrahamB

That code (Ron de Bruin's) is incredible and exactly what I was trying to do
(once 'Send' was replaced with 'Display').
Cheers Masters!
GrahamB
 

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