By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Create a clickable button in Excel that opens a blank email in outlook but attaches t

P: 1
I have created a button on Excel which I would like, when clicked, to attach the completed workbook to an email and be sent directly to a mail recipient.

How do I do this? The button has been created and is clickable I just need the process of embedding the/a code to it and what that code is!

Many thanks
Oct 10 '18 #1
Share this Question
Share on Google+
2 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,158
With MS Excel, that is a bit more involved than a simple point and click. This involves Office Automation and declaring an Outlook Object. The "answer" to this is an involved application.

I would recommend you search for VBA Office Automation Outlook, and this will give you some tools (often in the form of tutorials) that can walk you through the steps. Typically we will not do that for you on this forum.

Hope this hepps!
6 Days Ago #2

zmbd
Expert Mod 5K+
P: 5,326
@Badalchad
Read through the following Access Insights articles.
While they relate to Access, the concept will be the same for VBA in Excel.

home > topics > microsoft access / vba > insights > application automation

I and TwinnyFo has an article here too...
home > topics > microsoft access / vba > insights > sending e-mails via outlook - one developer's approach

So, once you have a general understanding of application automation from these two articles we can build on that information/understanding.

Try writing the VBA for the command button and see if you can get the code to compile and run successfully on your PC. There will be some slight changes in the vba code from what is in the articles, but not much, simple stuff like we'd remove some of the database specific code and insert the Excel references - really very minor.

If you cannot get your code to work, then please post back your code to this thread, Insert as text in-line format with the [CODE/] tool, and we can help you tweak the code to get it to run.
2 Days Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.