MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Email w/o Saving "Cont"

Posted by Jo on January 11, 2002 6:34 AM

I asked and got a great answer in an earlier post, but the answer was for only one sheet.

We send a copy of our invoice (inter office) to our secretary. There are three tabs w/the invoice. One for a log, one for our sister office and one for our office. Is there a way to send her all three of these at one time? (Without saving changes in our master invoice?)

Posted by Joe Was on January 11, 2002 7:41 AM

Sub SendSheet()
'By: Joe Was, 1/11/2002
'Sends a copy of each sheet hard coded, as email.
'Note to work the PC system needs a MSMail server,
'configured with a valid user profile. Or, other
'way of interacting with the application - mail -
'server, for your system.

'Add first sheet name below!

'Add second sheet name below!
'Copy and insert additional blocks as needed.

'Close the Workbook (Forms) without saving.
'To Close the Workbook and Save it Change,
'"False" below to "True"
ActiveWorkbook.Close SaveChanges:=False
End Sub

Hope this helps, the problem is that their are so many different configurations for networked mail servers, that most mailer code needs to be custom fitted to the system sending the mail! When you run this you need to note everything. What message boxes pop up what you are asked to to, etc. Then check if any house-cleaning needs to be done, like: for this code when run you may have a duplicate book or more in memory, just mouse click and delete.

Then check and see if the mail got to where it should and what was received? JSW