Automate excel and outlook using one set of code

GiraffetheGeek

Board Regular
Joined
May 25, 2011
Messages
58
Hi there,

I want to be able to create a button within an excel sheet that when pressed would email that spreadsheet as an attachment to a particular person.

I tried to record a macro to do this but only got:
Code:
Sub Email()
'
' Email Macro
' Macro recorded 26/9/2011 by xxxxxx
'
'
    Application.Dialogs(xlDialogSendMail).Show
End Sub

When the macro is run it only goes as far as the new email window.

Is there a way to code VBA to insert the email address and press the send button automatically?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top