Solved

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

Posted on 2014-02-20
3
597 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
3 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 150 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now