Quick and Easy answer needed - my mind has gone blank!

Tjtrev89

Board Regular
Joined
Sep 13, 2013
Messages
56
Hi Folks

I'm wanting to create a button in excel that, when clicked by the user, will automatically send an email from their outlook to a specified address.

I also want to have the subject field and email content already formatted and chosen by myself.

Finally if this could be done automatically without them having to see the email itself, that would be great.

Can someone please provide assistance with the code? I've done things very similar to this in the past, but my mind has gone blank.

Thanks for any help!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Thanks I now have woking code for excel and also for the same function in Powerpoint.

However, the email body still appears and the user has to select to send.

Can anyone recommend how i make it more automated?

Here is the code I'm using:


Sub _Click()

Dim olApp As Object, olMail As Object
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(0)
olMail.To = "reciepient.somewhere.com"
olMail.Subject = "Test"
olMail.Body = "Test"

olMail.display


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,046
Members
449,063
Latest member
ak94

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