Email sheet using a macro

christopher_hart

New Member
Joined
Feb 25, 2002
Messages
4
HI

i am trying to get excel to email a sheet to a certain address. I have managed to do this, however when i try and record a macro to perform this task, it doesn't work. Could any one help in providing a code for me to do this.

Basically all i want to do is send a copy of a filled in sheet to an e-mail address by just pressing a button.

Thanks for any help

Christopher Hart
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
assign this code to a button in your work book.

Private Sub CommandButton1_Click()

ActiveWorkbook.SendMail Recipients:="RECIPIENTS E-MAIL", Subject:="Goes Here", ReturnReceipt:=True
MsgBox "Your Request Has Been Sent", , "Title Goes Here"



End Sub
 
Upvote 0
Hi

Is there a way to just sent a specific sheet rather than the whole workbook.

I have tried the one that you gave me and as of yet i havn't received the email after sending it through outlook express. It could be that it just takes a while. This is the code that i used.

Private Sub CommandButton1_Click()

ActiveWorkbook.SendMail Recipients:="christopher_hart@hotmail.com", Subject:="ClaimsForm", ReturnReceipt:=True
MsgBox "The Claims Form has been sent", , "Claims Form"



End Sub


Thanks very much

Christopher
 
Upvote 0
hi

i have since got the code working fine. However is there an addition that could be made so that outlook or outlook express is loaded automatically in order to complete the send. Currently excel will say that it has been sent, howeverit has not. To send the file you have to open up outlook/outlook express and send it from there. For inexperienced users this is a problem.

Is there a code that can be added to open up outlook automatically.

Thanks

Christopher
 
Upvote 0
I'm not sure how to send a specific sheet haven't tried that yet.

The e-mail should go instantly, I've tested it several times on my PC

ô¿ô

Good luck
 
Upvote 0
hi

It is all working fine now. It still sends the whole workbook but that isn;t a problem.

It will send the email automatically using either program

Thanks for all your help

Christopher Hart
 
Upvote 0
I to did like this idea and have just added the code to my spreadsheet but, it worked fine on my home computer. But at work where I will be using the file we do not have Outlook/Express installed, we use Lotus Notes, will this still work using Lotus Notes? o
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,344
Members
448,570
Latest member
rik81h

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