Bonjour,
Dans son message, < Pia Kraus > écrivait :
In this message, < Pia Kraus > wrote:
|| How can I prevent users from deleting an autonumber (with a _ref...
|| textmark) which has hyperlinks pointing to it? My users often delete
|| autonumbers (listnum), and then the document contains many, many broken
|| links....
||
In my opinion, the short answer is that you can't. As long as users have
access to the document to edit it, it is almost impossible, without tons of
programming overhead, to prevent them from deleting something.
You could intercept the delete/cut event (EditDelete, EditCut) and the key
Delete key itself and check if the range to be deleted contains a bookmark
or not. But still... what if a user selects some text and types right over
it? The selected text will be gone and there is no real "delete" involved...
I guess you could educate your users, or have the text not to be deleted a
certain colour, and then change the colour before printing with a printing
macro, or flag the text not to be deleted with comments, or if you are using
2003, I hear you can protect ranges of text (not just sections), but if
users do not have 2003, what then? Or... there are workaround you can figure
out with a bit of imagination, but none will be foolproof!
Maybe someone will come along with a "tricky" solution!
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org