N/APosted on - 10/09/2011
We do not have any task tracking system in place. We usually maintained it through excel and then send it to associated users by email. We want have this process automated and spreadsheet should itself send an email (internet email ids like gmail, yahoo) whenever it gets modified. Can anyone help ?
Email notification once the excel spreadsheet modified.
just add this macro > Right-click the Worksheet's Name Tab and look for 'View Code' > On the VB window that'll open put this codes>
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Dim answer As String
answer = MsgBox("Put the message for the prompt when it'll ask you to save" vbYesNo, "title of the prompt or box")
If answer = vbNo Then Cancel = True
If answer = vbYes Then
'open outlook type stuff
Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)
newmsg.Recipients.Add ("[email protected]")
newmsg.Subject = "place the subject for your email here"
newmsg.Body = "contents of your automail here"
newmsg.Send 'send message
'give conformation of sent message
MsgBox "insert confirmation box test here", , "title of confirmation box"
'save the document
try it. I hope it helps.