![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 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 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Ontario, Canada
Posts: 326
|
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 |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 4
|
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 |
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2002
Posts: 4
|
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 |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Ontario, Canada
Posts: 326
|
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 |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Ontario, Canada
Posts: 326
|
Sorry didn't read your last post, I'll have to check on Opening Outlook.
Ziggy |
|
|
|
|
|
#7 |
|
New Member
Join Date: Feb 2002
Posts: 4
|
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 |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Feb 2002
Location: Ontario, Canada
Posts: 326
|
No Problem glad it helped
|
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
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
__________________
I appreciate the help from everyone at Mr. Excel. viper |
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Feb 2002
Location: Ontario, Canada
Posts: 326
|
It should work through the default mail program
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|