+ Reply to Thread
Results 1 to 6 of 6

Send automatic email after the workbook has been updated

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Send automatic email after the workbook has been updated

    Hi All,

    Is there a way to send an email to myself when the document is updated by a specific person? It would be good to have the email when the document is closed.

    The document is always updated by the same person and I don't want the email sent if it is updated by anyone else. e.g. I update the document on occasion and I don't want to send myself an email!

    FYI, we use Outlook.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Send automatic email after the workbook has been updated

    Yes but it depends on the outlook settings I think. I tried something similar to let me know when someone unauthorised tried to access an excel workbook but the problem I had was the outlook settings came up with a warning when excel tried to send an e-mail and the user had to approve the e-mail. I got around this by writing a text file to a network folder instead and then putting a macro in my outlook application to check the folder when I open outlook and send myself an e-mail with the details in the text file...

    http://www.excelforum.com/excel-prog...vba-excel.html
    To get the username I think you can use application.username

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Send automatic email after the workbook has been updated

    Thanks yudlugar

    I have managed to set the following code to run when the workbook closes:
    Please Login or Register  to view this content.
    Is there any way to only get this code to run when a specific user or users are using it?
    I don't want it to run when I close it but do when several other people do.

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Send automatic email after the workbook has been updated

    Yes, it depends on how many users there as to how you would do this, you would either need a lookup table somewhere or to hard-type it into the code, for example:
    Please Login or Register  to view this content.
    if there are only a few users who you don't want to send an e-mail it may be better to use
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Send automatic email after the workbook has been updated

    That works great!

    Thanks very much.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Send automatic email after the workbook has been updated

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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