+ Reply to Thread
Results 1 to 2 of 2

email after update sheetname, user

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    62

    email after update sheetname, user

    Is there a way to send an email when my workbook has been updated? It would have to contain what worksheet was updated and hopefully the user who updated it (if possible).

    I am currently using a Ron De Bruin example that sends a basic email letting people know it has been saved without specifics.

  2. #2
    Registered User
    Join Date
    10-12-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: email after update sheetname, user

    Anyone? Here is what I am using:

     Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
        Dim OutApp As Object
        Dim OutMail As Object
        Const SendTo As String = "nobody@email.com"
    
        Set OutApp = CreateObject("Outlook.Application")
    
        OutApp.Session.Logon
        Set OutMail = OutApp.CreateItem(0)
    
        With OutMail
            .To = SendTo
            .Subject = ThisWorkbook.Name & " has been amended"
            .Body = " The Incident report log has been updated.  Ken, is this okay for an update?"
            .Send
        End With
    
        Set OutMail = Nothing
        Set OutApp = Nothing
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1