How to create an excel reminder to Outlook? is it possible?

Maximilian88

New Member
Joined
Apr 8, 2015
Messages
3
Hello all and thanks in advance,

I wonder if it is possible to create a macro, and if so how, that tells excel ,that everytime that changes in the sheet get saved , send an email to a certain outlook account. That would help heaps to fix some comunication problems that happen in the company where Im working as information is not always comunicated .

Thanks again in advance!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
you can use the below vba code which will send out an email before saving the workbook. you have to modify the code as per your needs and you should save it under "ThisWorkbook":


Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Dim aOutlook As Object
Dim aEmail As Object
Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
strRecipients = "xyz@abc.com" 'change the email id

'set Importance
aEmail.Importance = 2
'Set Subject
aEmail.Subject = "Test Mail"
'Set Body for mail
aEmail.Body = "Sending mail just before saving workbook"

'Set Recipient
aEmail.To = strRecipients


aEmail.Send

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,724
Messages
6,126,493
Members
449,316
Latest member
sravya

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