Solved

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

Posted on 2014-02-20
3
607 Views
Last Modified: 2014-02-20
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:

       Selection.Editors(wdEditorEveryone).Delete

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.

Thanks
0
Comment
Question by:hj_daisy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 150 total points
ID: 39873326
Hi,

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

Regards
0
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 150 total points
ID: 39873525
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

0
 

Author Closing Comment

by:hj_daisy
ID: 39875394
Both solutions have led me to get the macro information that I need, so am awarding the solution to both.  

Appreciate your help.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question