Word 2003 - VBA code to find out if text is assigned as editable or not?

Hi Gurus

I can assign a range of text so that it can be edited by 'everyone' by using this code:

        Selection.Editors.Add wdEditorEveryone

And I can prevent a range of text from being edited by everyone by using this:


But how can I test what has been set for a range of selected text?  I need to know if it has been assigned to everyone or not.  

I'm sure it's very simple but I can't find it.  Hope you can help.

Who is Participating?
Rgonzo1971Connect With a Mentor Commented:

it seems that the Editors Object can only return a Count

'If there is an editor
If Selection.Editors.Count >0 Then
Else ' No Editors

End If

Open in new window

GrahamSkanConnect With a Mentor RetiredCommented:
Actually you can get the Editor objects as well, but For Each doesn't work on the collection. You have to count through.
Dim ed As Word.Editor
Dim i As Integer

For i = 1 To Selection.Editors.Count
    Set ed = Selection.Editors(i)
    Debug.Print ed.Name
Next i

Open in new window

hj_daisyAuthor Commented:
Both solutions have led me to get the macro information that I need, so am awarding the solution to both.  

Appreciate your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.