What email program do you use? And what version?
I have an Excel form used for employees to enter their bonuses. I want this form to be online so they can enter their information and hit “submit” and it will be delivered to me via email. I have domain that is hosted by a company. Can anyone give me step-by-step instructions?
The Form is attached
What email program do you use? And what version?
Ken Puls, FCPA, FCMA, MS MVP
Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
Outlook 2010
Okay, so here's how it works... (VBA code courtesy of Ron deBruin's site at http://www.rondebruin.nl/mail/folder2/mail1.htm)
When you're in Excel:
- Press Alt+F11 to enter the VBA editor
- If you don't see a tree browser at left press CTRL+R to display it
- Drill down into your workbook
- Right click "Microsoft Excel Objects" (or something else within your workbook)
- Choose Insert-->Module
- In the pane that opens, paste in the following code:
Code:Sub Mail_Workbook_Outlook() 'Sends the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = "youremail@yourdomain.com" .CC = "" .BCC = "" .Subject = "Put your subject here between the quotes" .Body = "If you'd like to send a message, type that between the quotes here" .Attachments.Add ActiveWorkbook.FullName .Send 'or use .Display if you'd to test it without sending End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End SubAt that point, you should be good to go.
- Close the VBA Editor
- On the Developer Tab, choose Insert-->Form Control-->Button
- Drag a button onto the worksheet
- When it pops up and asks you to assign a macro, choose "Mail_Workbook_Outlook"
If you need any further help, let me know.
Ken Puls, FCPA, FCMA, MS MVP
Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
That works really good. Thank You
Glad to help!
Ken Puls, FCPA, FCMA, MS MVP
Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
Ken, I used your code above and it was very helpful to me. I was wondering if there is a variation of his code where the user of the form would not have to save the form before the submitted it. The problems am having is that people are forgetting to save the form before they hit submit. So I am getting blank or partially filled out forms emailed to me. Is I possible to have the code altered so that when they hit submit it send me whatever the have currently filled out even if hey did not hit save first? Thanks!
Bookmarks