Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2014, 03:13 PM
fumei fumei is offline Students Cheating Windows 7 64bit Students Cheating Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

First of all, there is no definitive way to make anything to do with a Word document truly, fully, secure. Someone who really knows Word can find a way to get past just about anything.

That being said, yes checking the editing time is a good clue. However, "editing time" ONLY means the accumulated time in a single session the document is open. If you open a Word document and do nothing, just wait an hour, the "editing time" is increased by one hour. So if someone knew that, they could cheat your check of time by simply leaving the document open for an hour. And, as macropod pointed out, the new person would likely do a SaveAs, which resets it.

You could grab some data on who and when the document is opened and store them in document variables. Again, if someone really knows Word they could fudge this. However, document variables are NOT visible to normal Word use, unless you look for them. You could put the following in the Document_Open event (in the ThisDocument module).

Code:
Private Sub Document_Open()
Dim strUser As String
Dim aVar
Dim num As Long
strUser = Environ("username")
For Each aVar In ActiveDocument.Variables
   If aVar.Name = strUser Then num = aVar.Index
Next aVar
If num = 0 Then
   ActiveDocument.Variables.Add Name:=strUser, Value:=Now
Else
   ActiveDocument.Variables(num).Value = Now
End If
End Sub
This gets the user logon name - environ (username) - and gives that to a variable. then it checks to see if there is an existing document variable of that name. If there is, it changes its value to Now (current date and time). If there is not - i.e. this is a NEW user opening the document - a document variable is added: Name = username, Value = Now.



To read who and when opened the document:
Code:
Sub GetAllVariables()
Dim aVar
Dim strListVars As String
For Each aVar In ActiveDocument.Variables
  strListVars = strListVars & _
     aVar.Name & vbTab & aVar.Value & vbCrLf
Next
MsgBox strListVars
End Sub
This displays a messagebox with the name and date the document was opened.

AGAIN, though, it is a very very simple thing to open up the VBA editor, see the above code and...delete it. Boom. then delete any existing variables. Boom. Gone.

Can you "sort of" catch cheaters? Maybe. Can you catch a cheater who knows Word? Probably not.
Reply With Quote
  #2  
Old 04-03-2014, 03:42 PM
macropod's Avatar
macropod macropod is offline Students Cheating Windows 7 32bit Students Cheating Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by fumei View Post
AGAIN, though, it is a very very simple thing to open up the VBA editor, see the above code and...delete it. Boom. then delete any existing variables. Boom. Gone.
Indeed, the whole scheme will be defeated if the user has their macro security set to 'high' or doesn't allow the macro to run. It also relies on the cheater using the accomplice's document as their own. Students will soon wise up to the security when they find they're being prompted to save changes to the document after having done nothing more than opening it. Although you could add code to save the document immediately the variables are updated, the change in the file's date/time stamp would be its own give-away.

Gerry's approach will also be defeated if the cheater simply opens a copy of the accomplice's document to copy content from, pastes it into their own document, then deletes the accomplice's copy after closing (which is quite likely).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge a letter to headmasters with rows of data/students assoc. w/school sgaeta Mail Merge 7 04-10-2014 06:34 AM
Students Cheating How to check if two documents have the same base? (i.e. if students were cheating) marcin Word 2 03-30-2012 04:59 AM
Students Cheating Re-installation of MS Office for Home and students Roshan Hanief Word 2 06-09-2011 09:40 AM
Office 2010 for £38.95 for students with Tech Guarantee Kez123 Office 0 03-11-2010 04:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft