'Word 2003, Check if selection is protected.

J

jans__

Hi there,

I would like to know if the selected text is protected and if it is
protected, how it is protected.

Is there code to do this.

Is there code simulair to the document protectiontype -
Activedocument.Protectiontype -

But now I would like to know if the selection is protected in de
document?
msgbox selection.editortype????? or something like this

Can someone help me with this.

Thanx,

Jans
 
D

Doug Robbins - Word MVP

You can tell if it is protected for forms by using the following which will
return True if that is the case:

Selection.Sections(1).ProtectedForForms

I am not sure that the other forms of protection can be detected.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

jans__

This only tells me if the section has any protection.

I would like to know if the selection has any protection.
I was hoping that there would be an information instruction or
something like that.

Jans
 
T

Tony Jollans

If a document is protected for forms you cannot select protected areas so
the question doesn't need asking.

If a document is protected for comments any selection in the main document
is protected by definition so, again, the question doesn't need asking.

So the only issue is Word 2003's read-only protection. I don't know off the
top of my head and don't have 2003 in front of me but I don't think there's
an easy way. You might to be able to work something out using the range
result of gotoeditablerange compared to the selection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top