PDA

View Full Version : [SOLVED] Is there a way after macro runs to email.............



mercmannick
07-19-2005, 09:15 AM
Is there a way that after a macro is run to send out by email just the updated sheet not entire workbook ?



Regards

Merc



:hi:

justme
07-19-2005, 09:57 AM
There is a lot of good information on code for sending mail from Excel at this site
http://www.rondebruin.nl/sendmail.htm

HTH

mercmannick
07-19-2005, 10:11 AM
Justme

how do you code the line if u have 10-20 recipitents ?

Merc

lucas
07-19-2005, 10:15 AM
mercmannick (http://www.vbaexpress.com/forum/member.php?u=2673)
If you go to the top of this page and click on kbase you will find many scripts that address emailing excel files and sheets. When you get to the kbase main page, click on search and search for mail or email. I saw three submissions there on the 1st part of the search return, probably more there. If you don't find what you need or you need help, post back here.

Here is a link to the knowledgebase search engine:
http://www.vbaexpress.com/kb/default.php?action=search

Bob Phillips
07-19-2005, 10:17 AM
Justme

how do you code the line if u have 10-20 recipitents ?

Merc
Instead of using the To property, you could add Recipients, like so

.script12hide { display: none; }


Set oRecipient = OutMail.Recipients.Add("some.body@somewhere.com")
oRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.


or you could create a distribution list and mail to that

MOS MASTER
07-19-2005, 02:46 PM
how do you code the line if u have 10-20 recipitents ?


Hi, :hi:

Example 2 on this page:
http://www.rondebruin.nl/mail/folder1/mail2.htm

HTH, :whistle: