470,575 Members | 1,884 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,575 developers. It's quick & easy.

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

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
2 3236
3,653 Expert Mod 2GB
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!
May 13 '19 #2
5,436 Expert Mod 4TB
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.
May 17 '19 #3

Post your reply

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

Similar topics

1 post views Thread by Roedy Green | last post: by
3 posts views Thread by crazychrisy54 | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.