Editors and Documentprotection

P

Peter Karlström

Hi

I'm working with document protection for Word 2003 in a VB6 COM-addin project.

The protection is based on Editors for selected areas of the document which
locks for editing on other areas. This solution works well.

There is one option in Words UI in which you can toggle between showing
editable areas or not.
I don't want the editable areas of the document to be visible and want to
turn this off from the COM-addin, but I can't find the setting for this.

Does anybody know?

Thanks in advance

Best regards
 
C

Colbert Zhou [MSFT]

Hello Peter,

The editable range's visible status is controlled by the
ActiveWindow.View.ShadeEditableRanges property.

So please try this,

Sub Macro1()
ActiveWindow.View.ShadeEditableRanges = False
End Sub

Please let me know if any future help needed on this. Have a nice day!

Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Peter Karlström

Hi Colbert

This was the one. Thanks.

But I just ran into another problem....
It seems that the document is set to track revisions, but the property
TrackRevisions för the document is False. Also, the button for
activating/deactivating TrackRevisions is disabled in the menu.
Everything entered is in red text and underlined.

I can manually change presentation of revisions and remove the specific
formatting, but if the user really wants to track revisions, these will not
be seen.
And how can the user activate it when the button is disabled.

This is what I do in the code when the document is created:
(tDoc is as Word.Document object)
+++++Start code++++++
Dim sect As Word.Range
Set sect = tDoc.Sections(2).Range
sect.Editors.Add wdEditorEveryone
tDoc.Protect wdAllowOnlyReading, , "secretPassword"
tDoc.ActiveWindow.View.ShadeEditableRanges = False
tDoc.TrackRevisions = False
+++++End code++++++

Thanks in advance

--
Peter Karlström
Midrange AB
Sweden
 
C

Colbert Zhou [MSFT]

Hello Peter,

After the document is protected, setting the TrackRevisions to false will
have no effect. So could you please try the following codes to see if it
fixes?

Dim tDoc As Word.Document
Set tDoc = Application.ActiveDocument
tDoc.TrackRevisions = False
Set sect = tDoc.Sections(2).Range
sect.Editors.Add wdEditorEveryone
tDoc.Protect wdAllowOnlyReading, , "123"
tDoc.ActiveWindow.View.ShadeEditableRanges = False

Thanks! Please let me know if you have any future questions or concerns on
this. Have a nice day! :)


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
P

Peter Karlström

Hi Colbert

The customer has decided to shrink the size of their first page, which means
that we wount use any document protection at all.
We can protect the contents in Header and Footer using the
WindowSelectionChange event instead, which was our first suggestion to the
customer.

The reason is that their users must have access to the TrackRevision function.

Thanks for your support.

Best Regards
 
C

Colbert Zhou [MSFT]

That's OK. So I am closing the thread in my side at this time. I appreciate
your time working on this with me and thanks again for contacting Microsoft
Newsgroup Support.

Have a good day, Peter! :)


Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top