Document protection alternatives

  • Thread starter Peter Karlström
  • Start date
P

Peter Karlström

Hi

I'm developing a COM Addin in VB6 for Office 2003.
One of the goals with the application is that the customer wants to protect
some parts of the document.
When doing this in earlier projects I have put the parts to protect in the
header and footer of the document and used the WindowSelectionChange-event to
capture when the user tries to access these areas.
However, this customer want too much information to be protected and the
Header/Footer cant hold it all. About 60% of the first page seems to be the
roof , and some cells in the customers table doesn't fit and don't show.
I have then tried to put some of it outside the header/footer and created a
continous section-brake together with document protection for this first
section.
The solution is perfect if it wasn't for the fact that a lot of
functionality is lost in the other "open" sections of the document. For
instance doesn't PagePreview work as expected and a lot of meny options is
disabled.

The data in the protected area is mostly DOCPROPERTY values placed in a
structured table.

Is there another way to accomplish this kind of protection?

Thanks in advance
 
J

\Ji Zhou [MSFT]\

Hello Peter,

Glad to see you again! After reading your post, I am thinking why not use
the Document.Protect method to protect the Word document.

The document.Protect method can protect the whole document from being
edited. If we want some parts of it can be modified, we just need to call
Editors.Add(wdEditorEveryone) method on the specified range.

You can find the MSDN document related to this topic here,
http://msdn.microsoft.com/en-us/library/ms178793.aspx. Although this
document is written for VSTO, the Word object model is same. Therefore, we
can do the same thing in our VB6 COM Add-In.

Please let me know if this helps for your scenario. If you have any future
questions or concerns on this, do not hesitate to update this thread.

Have a nice day Peter!


Best regards,
Ji Zhou ([email protected], 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 Ji Zhiu

Thank you for the quick and most helpful reply.

After some research I found that I could use the AllowOnlyReading protection
for the first section, and let the rest of the document be open for editing
using the Editors.Add technique.

This was exactly what I was looking for.

Best Regards
 

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