Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a "Send" button
I have created a form using Excel. I would like the people who fill out his
form to click a Submit This Form button at the top of his form and have this button e-mail the form file to me (with the form file as an attachnemt to the e-mail). I need to know how to create a button in an Excel file, so that when you click this button, it generates an e-mail addressed to a pre-specified recipient (e-mail would be pre-addressed to me) with the completed form file as an attachment to the e-mail. I have a lot of experience working with Excel, so if possible, Id prefer to do this using a hyperlink and the capabilities of Excel, without using Visual Basic. Is there a way to do what I need to do using Excel? If Visual Basic is the only way this can be done, can you walk me through the process of creating a button (and help me write the macro language) to do this? (I have very little experience with Visual Basic!) Thank you so much for your help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a "Send" button
On Oct 8, 4:51 pm, Leslie wrote:
I have created a form using Excel. I would like the people who fill out his form to click a "Submit This Form" button at the top of his form and have this button e-mail the form file to me (with the form file as an attachnemt to the e-mail). I need to know how to create a button in an Excel file, so that when you click this button, it generates an e-mail addressed to a pre-specified recipient (e-mail would be pre-addressed to me) with the completed form file as an attachment to the e-mail. I have a lot of experience working with Excel, so if possible, I'd prefer to do this using a hyperlink and the capabilities of Excel, without using Visual Basic. Is there a way to do what I need to do using Excel? If Visual Basic is the only way this can be done, can you walk me through the process of creating a button (and help me write the macro language) to do this? (I have very little experience with Visual Basic!) Thank you so much for your help! Leslie, Follow the link and you will be able to complete the task with no problem.(not a walkthru though) http://www.ozgrid.com/VBA/send-email.htm |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a "Send" button
On Oct 8, 4:51 pm, Leslie wrote:
I have created a form using Excel. I would like the people who fill out his form to click a "Submit This Form" button at the top of his form and have this button e-mail the form file to me (with the form file as an attachnemt to the e-mail). I need to know how to create a button in an Excel file, so that when you click this button, it generates an e-mail addressed to a pre-specified recipient (e-mail would be pre-addressed to me) with the completed form file as an attachment to the e-mail. I have a lot of experience working with Excel, so if possible, I'd prefer to do this using a hyperlink and the capabilities of Excel, without using Visual Basic. Is there a way to do what I need to do using Excel? If Visual Basic is the only way this can be done, can you walk me through the process of creating a button (and help me write the macro language) to do this? (I have very little experience with Visual Basic!) Thank you so much for your help! Try this: open your workbook do ALT f11 in your workbook do insert and click module doble click on the module you inserted copy/paste this code Sub Mail_workbook_Outlook_1() 'Working in 2000-2007 'This example send the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = "email here" .CC = "email here" .BCC = "" .Subject = "Report" .Body = "what will fill the body here" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Display 'or use .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub save go to the worksheet create a square figure as you would in drawing in excel right click on it and click asign macro choose the macro you created "Mail_workbook_Outlook_1" now when you click the square you created it will run the macro. it will open outlook and you send the page. cheers |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a "Send" button
Thank you. I'll try both of your suggestions!
"Sangel" wrote: On Oct 8, 4:51 pm, Leslie wrote: I have created a form using Excel. I would like the people who fill out his form to click a "Submit This Form" button at the top of his form and have this button e-mail the form file to me (with the form file as an attachnemt to the e-mail). I need to know how to create a button in an Excel file, so that when you click this button, it generates an e-mail addressed to a pre-specified recipient (e-mail would be pre-addressed to me) with the completed form file as an attachment to the e-mail. I have a lot of experience working with Excel, so if possible, I'd prefer to do this using a hyperlink and the capabilities of Excel, without using Visual Basic. Is there a way to do what I need to do using Excel? If Visual Basic is the only way this can be done, can you walk me through the process of creating a button (and help me write the macro language) to do this? (I have very little experience with Visual Basic!) Thank you so much for your help! Try this: open your workbook do ALT f11 in your workbook do insert and click module doble click on the module you inserted copy/paste this code Sub Mail_workbook_Outlook_1() 'Working in 2000-2007 'This example send the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = "email here" .CC = "email here" .BCC = "" .Subject = "Report" .Body = "what will fill the body here" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Display 'or use .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub save go to the worksheet create a square figure as you would in drawing in excel right click on it and click asign macro choose the macro you created "Mail_workbook_Outlook_1" now when you click the square you created it will run the macro. it will open outlook and you send the page. cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a "Send" button | Excel Discussion (Misc queries) | |||
Create a "Send" button | Excel Worksheet Functions | |||
Signature missing when "send to" "mail recipient" | Excel Discussion (Misc queries) | |||
Send emails through VBA but skip outlook "Yes" button | Excel Programming | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions |