Code to send just 1 worksheet in a workbook.

Deirdre

Board Regular
Joined
Feb 28, 2002
Messages
137
Good afternoon~

After completing a search on these boards for an answer to my question, I am still without an answer or direction so I shall hopefully get new information.

I have a workbook which contains many sheets. These sheets contain salary and bonus information. I would like to be able to send the sheets to the appropriate people without having to send the entire workbook as it would be very inappropriate for others to view this personal information. The email program we use is Outlook on a Microsoft Exchange server.

The sheets are named for the person it concerns, so there is no "Sheet1" etc.

Your time and assistance is very much appreciated.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Yes I had thought of that, and that is currently what I do. I was just hoping to cut out those steps with some code if possible.

Thanks!
 
Upvote 0
In code, I *feel* that thas is the shortest code you'll get... because the other version would imply, probably, the creation of an HTML version of the sheet, which could take longer.
 
Upvote 0
Hi,

You would have to save the worksheet as a file and then send that as an attachment... and we have discussed that recently... try the search function.

Here's a start on the sending part:


Dim ol As Outlook.Application
Dim olMail As MailItem

Set ol = CreateObject("outlook.application")
Set olMail = ol.CreateItem(olMailItem)
olMail.To = "ray"
olMail.Subject = "Prod Sch"
olMail.Body = "Last Friday's Production Schedule"
olMail.Importance = olNormal
olMail.Sensitivity = olNormal
olMail.Attachments.Add ("G:ExcelFormsProd Sch")
olMail.Send
 
Upvote 0
On 2002-08-27 12:57, Jim North wrote:
You would have to save the worksheet as a file and then send that as an attachment... and we have discussed that recently... try the search function.

In this very same thread !!! :wink:
 
Upvote 0

Forum statistics

Threads
1,203,667
Messages
6,056,649
Members
444,880
Latest member
Kinger1968

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top