Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word and Excel Security within Small Company

Status
Not open for further replies.

kennycad

Technical User
Jan 26, 2005
52
AU

Within our small company we have a number of key spreadsheets and word doc's that all staff use on a daily basis. Alot of time has gone into creating these docs and i am looking for a way to ensure they stay within the office and dont walk out the door with employee's if they were to change jobs or start up on their own.

I have resigned myself to the fact that i am unable to stop them copying them to disk or emailing to themselves at home, therefore i was looking for some sort of system where the XLS or DOC looks for a hidden file located on a shared drive prior to opening, if the file is found the document opens, if no it fails to open.

Is there a way to incorperate this into docs ? AutoOpen???

Cheers
 
i was looking for some sort of system where the XLS or DOC looks for a hidden file located on a shared drive prior to opening
How is the doc/xls file going to look prior to opening? It has to start the open procedure to fire anything. However, what you are asking for can be done.
Code:
Sub Document_Open()
Dim IsThere As String
IsThere = Dir("c:\HasToBeHere.txt")
If IsThere = "" Then
    MsgBox "Bad dog...bad!"
    ActiveDocument.Close wdDoNotSaveChanges
    Exit Sub
Else
    ' presumably nothing happens here
    ' or maybe MsgBox "Good dog."
End If
End Sub
If the file c:\HasToBeHere.txt is not there, the message is displayed, and the file is closed. If it is there, the file finishes opening.

This is NOT secure!

Gerry
My paintings and sculpture
 
I would encrypt it (assuming you are using XP & NTFS). If anyone ever saw your macro they would know what file name they would need to create to allow the sheet to open, which is why fumei says this method is not secure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top