ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Excel macro email notification

Macro that send email notification if the exel file(s) is/are modified

user-image
تم إضافة السؤال من قبل Pablo Dimaunahan , AV and ELV CAD Draftsman , Site Technology LTD. Co.
تاريخ النشر: 2015/05/26
FITAH MOHAMED
من قبل FITAH MOHAMED , Financial Manager , FUEL AND ENERGY CO for transportion petroleum materials

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) Dim answer As String answer = MsgBox("This is where you put the text to prompt the user if he wants to save or not" vbYesNo, "here is the title of that 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) 'add recipients 'newmsg.Recipients.Add ("Name Here") newmsg.Recipients.Add ("") 'add subject newmsg.Subject = "Subject line of auto email here" 'add body newmsg.Body = "body of auto email here" newmsg.Display 'display newmsg.Send 'send message 'give conformation of sent message MsgBox "insert confirmation box test here",, "title of confirmation box" End If 'save the document 'Me.Worksheets.Save End Sub

Firas Shahadi
من قبل Firas Shahadi , Human Resources Director , SAUDI UNION

sending email is easy.

but to send an email every time the sheet changed, you need to think about it.

 

to send the work book check this web site here

 

المزيد من الأسئلة المماثلة