Group:  Microsoft Word ยป microsoft.public.word.vba.customization
Thread: [MS Word2007]: How to remove "Editing Exceptions" (previously adde

[MS Word2007]: How to remove "Editing Exceptions" (previously adde
[Gizmo] 11/10/2008 9:31:01 AM
Hi,

Using the "Protect/Unprotect" task pane in Word, I have been able to protect
my document and set areas of exclusion (for which editing is possible to
everyone).

I have also been capable of doing this progamatically using:

Set beforeFirstBookmarkRange = ActiveDocument.Range(beginDoc, firstBookmark)
beforeFirstBookmarkRange.Select
Selection.Editors.Add wdEditorEveryone 'Add this range as an Exception

How can I remove this exception using VBA?

thanks,

Nuno
Re: [MS Word2007]: How to remove "Editing Exceptions" (previously adde
"Tony Jollans" <My forename at my surname dot com> 11/11/2008 12:49:13 AM
Selection.Editors(wdEditorEveryone).Delete

--
Enjoy,
Tony

www.WordArticles.com

"[Gizmo]" <[Gizmo][ at ]discussions.microsoft.com> wrote in message
news:C0F8A04C-DDD8-4D7F-92D5-C0F74976CB32[ at ]microsoft.com...
[Quoted Text]
> Hi,
>
> Using the "Protect/Unprotect" task pane in Word, I have been able to
> protect
> my document and set areas of exclusion (for which editing is possible to
> everyone).
>
> I have also been capable of doing this progamatically using:
>
> Set beforeFirstBookmarkRange = ActiveDocument.Range(beginDoc,
> firstBookmark)
> beforeFirstBookmarkRange.Select
> Selection.Editors.Add wdEditorEveryone 'Add this range as an Exception
>
> How can I remove this exception using VBA?
>
> thanks,
>
> Nuno

Re: [MS Word2007]: How to remove "Editing Exceptions" (previously
[Gizmo] 11/11/2008 9:32:01 AM
Hi!,

Many thanks for your suggestions!! I have managed to find the solution, with
also the help from the VBE context menu:

Here it is (so that others my see it):

ActiveDocument.Unprotect Configuration.PROTECT_PASSWORD
Dim objEditor As Editor
Set objEditor = Selection.Editors(1)
objEditor.DeleteAll

Thanks anyway!!

"Tony Jollans" wrote:

[Quoted Text]
> Selection.Editors(wdEditorEveryone).Delete
>
> --
> Enjoy,
> Tony
>
> www.WordArticles.com
>
> "[Gizmo]" <[Gizmo][ at ]discussions.microsoft.com> wrote in message
> news:C0F8A04C-DDD8-4D7F-92D5-C0F74976CB32[ at ]microsoft.com...
> > Hi,
> >
> > Using the "Protect/Unprotect" task pane in Word, I have been able to
> > protect
> > my document and set areas of exclusion (for which editing is possible to
> > everyone).
> >
> > I have also been capable of doing this progamatically using:
> >
> > Set beforeFirstBookmarkRange = ActiveDocument.Range(beginDoc,
> > firstBookmark)
> > beforeFirstBookmarkRange.Select
> > Selection.Editors.Add wdEditorEveryone 'Add this range as an Exception
> >
> > How can I remove this exception using VBA?
> >
> > thanks,
> >
> > Nuno
>
>

Home | Search | Terms | Imprint
Newsgroups Reader