Tagging an excel workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My requirement is to uniquely identify any excel workbook across the network,
which leads me to a requirement of tagging the document.

Possible solutions are:-
1. using filename (not useful, since it can be changed)
2. using path (not useful, since file could be copied or moved)
3. using documentProperties (This solves my prob to a large extent, first it
is persistent and associated with the workbook. The only problem is that
users could see the DocumentProperty in custom tab and change the value.)

Is there any way to hide the Documentproperty or another feasible way to tag
an excel workbook.

Thanks,
Rahul
 
Use a hidden name

Sub SetName()
ActiveWorkbook.Names.Add Name:="__WBTag", RefersTo:="some_value"
End Sub


Sub GetName()
MsgBox Evaluate(ActiveWorkbook.Names("__WBTag").RefersTo)
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
The method suggested by Bob is a good one.
You can also create a very hidden worksheet in each workbook and save any
information whatsoever on it. The users do not see the very hidden worksheets
in the hidden list and hence cannot unhide it.
 
Thanks Bob. But,
I forgot to mention that the mention should be generic enough to be used in
Word and Excel.

Also another query, if a DocumentProperty could be changed by any user
through the custom tab or only the power users?
 
Bob's solution will mean you will have to open the file to check that value.
If you will always be on systems that use NTFS, there is also Alternate Data
Stream. You can attached various data to files and it follows the file in a
not readily visible way.
I would not necessarily recommend using this method, but it's available, if
your Admin has not disabled it somehow. Make sure the you understand the
potential hazards.
http://www.personalinformationorganizer.com/download/ntfs/

If using CustomDocumentProperties, you gave each prop a suitably obscure
name, any user that changed it/them, would be just guessing, determined to
cause trouble. Unfortunately, your code would have no way to know.

NickHK
 
Back
Top