Solved

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

Posted on 2014-02-20
3
604 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

737 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