Word VBA >> edit bookmark in protected document

by VGFjbyBCYW5kc3RyYQ » Mon, 19 Jul 2004 15:33:01 GMT

I have created a template with checkboxes to let users decide which bookmark they want to see and which not. Is it possible to let the users edit the bookmarks while the rest of the document is protected?


Word VBA >> edit bookmark in protected document

by DA » Tue, 20 Jul 2004 06:46:13 GMT


Hi Taco Bandstra

I'm not exactly sure as to how far back this
functionality goes, but in Word 2003 you can set your
protection type to "Comment Protection".

With this type of protection set, you can specify a
region of text that allows nominated users to freely edit
that area (in effect creating an exclusion). If you
include your bookmarks into those exclusion zones, you
should be able to get the functionality you're after.

To perform this manually:
Bring up your "Protect Document" task pane.
Select "Comments" as your Editing Restrictions. Select a
region of text containing your bookmarks and then add a
user or group from the "Exceptions" part of that dialog.
Finally press "Yes, Start Enforcing Protection". You
should see the exclusion areas highlighted.

To do this programatically via VBA:
Create a selection object for the text that includes your
bookmarks. Do a "Selection.Editors.Add" to set which
users can edit that region. Finally, send the
command "ActiveDocument.Protect" to turn on the
protection.

Hope that helps,

Dennis


decide which bookmark they want to see and which not. Is
it possible to let the users edit the bookmarks while the
rest of the document is protected?



Word VBA >> RE: edit bookmark in protected document

by VGFjbyBCYW5kc3RyYQ » Thu, 22 Jul 2004 16:45:04 GMT

I tried the manually solution and Word highlights the selection but i am not allowed to edit after protecting the document. Eventhough my user is named in the exceptionsbox.

For the VBA solution, i am green in VBA programming. How do you create a selection for the text that includes the bookmarks?





Similar Threads

1. Protect Document - Remove Editing Restrictions

VBA Gods;

I recently created a template that uses editing restriction from the
Protect Document Task Pane.  In my code I want to be able to remove
that protection for a specific user which I can do.  The only caveat is
that I am unable to remove the Highlighted Unprotected portions of the
document.  The only way I am able to do this is through the Task Pane
by unselectting the Editing Restrictions checkbox and answering "yes"
to the dialog pop-up which asks if I want to ignore exceptions.  This
is what I want to do in the code.
  
Any suggestions?

Thanks in advance for your help

2. Protecting form in document, but also edit the rest of document

3. Bookmarks and protected document

Hi

Can someone let me know if this is possible?

I am using Word 2003 sp3

I have a doc, have added bookmarks and hyperlinks etc.  All works fine.
When I protect the doc, these hyperlinks stop working.
Is it possible to have these hyperlinks working and protected (so they can't 
be deleted)

Many thanks

Dunc

4. Bookmarks with protected document - Word Document management

5. Word 2000 Insert text into bookmark of Protected document

I've written a little VB 6.0 app that creates a Word 2000 application object 
to open any selected Word document.

I want to search for a particular Bookmark and then insert text into it.  

I have been able to locate the bookmarks, but since the document is 
protected I get an error inserting the text using either .InsertBefore or 
.InsertAfter.

Does anyone know how to insert the text into the bookmark and retain the 
bookmark?  

I can manually unprotect the document and then the program runs fine, but it 
still either inserts the text before the bookmark or after it, or replaces 
it.  I want to keep it.

Any help is appreciated.

Thanks,

King

6. bookmark, protect documents, word 2003 - Office Word Programming

7. Protected document with bookmarks

I have a document that contains a number of Bookmarks. I'd like to add some 
check mark boxes on this document, but in order to enable these checkboxes 
the document needs to be protected which disables the bookmark links.
There is a Selection.Hyperlinks(1).Follow, but this will not work with a 
Bookmark link.  Is there some code I can use to do this?
Thanks

8. re-select a bookmark on exit in protected document - Office Word Programming