Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Alert When A Document is Changed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robzrob - 23 May 2008 18:58 GMT
Is there any mechanism in Microsoft Office which will send an email
when an Excel (or Word) document has been amended?
ryguy7272 - 23 May 2008 22:14 GMT
This will record a user's ID each time Excel file is opened:
Private Sub Auto_Open()

   LogInformation ThisWorkbook.Name & " opened by " & _
   Application.UserName & " " & Format(Date, "yyyy-mm-dd") & " " &
Format(Time, "hh:mm")
   'LogInformation Variable1 & "," & Variable2 & "," & Now
   
End Sub

Sub LogInformation(LogMessage As String)
Const LogFileName As String = "C:\MyLog.txt"
Dim FileNum As Integer
   FileNum = FreeFile ' next file number
   Open LogFileName For Append As #FileNum ' creates the file if it doesn't
exist
   Print #FileNum, LogMessage ' write information at the end of the text file
   Close #FileNum ' close the file
End Sub

Notice, you must have a Text file named 'MyLog.txt' at this location:
"C:\MyLog.txt"

Regards,
Ryan--

Signature

RyGuy

> Is there any mechanism in Microsoft Office which will send an email
> when an Excel (or Word) document has been amended?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.