Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / May 2005

Tip: Looking for answers? Try searching our database.

"Protect Document" feature does not work in a VSTO 2005 Word Template project !!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ZK - 18 May 2005 19:07 GMT
Hi,
I have a Word Template project created using VSTO 2005.
When I try to protect the document ,from the VS 2005 IDE, the button
which says "Yes, Start Enforcing Protection" never gets enabled.
How do I protect the document in this case ??
I want to allow the users to edit only specific parts in the document,
which is mapped to a XML schema.

Many Thanks in advance,
ZK.
Ken Laws [MSFT] - 18 May 2005 21:13 GMT
Hi ZK,

The behavior that you are seeing regarding document protection with
Microsoft Word while hosted in the designer is expected.  When the document
is open within Visual Studio the document is opened in design mode.  The
document must be in run mode before you can begin enforcing protection.

I have included a link to additional information concerning this issue which
is contained within the Visual Studio help file below.

ms-help://MS.VSCC.v80/MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vstcore/html/a25472ad-03f0-4804-9d19-e5ff71340d49.htm

As documented in the help file:

"Visual Studio Tools for Office automatically enables protection with an
empty password. If you want the document protection to have a password, you
must add the password before you deploy your solution. For details about
setting a password, see Help in the specific Office application."

If you have any questions please let me know via the posting.

Regards,

Ken Laws
Microsoft Support


This posting is provided "AS IS" with no warranties, and confers no rights.

For more information regarding Visual Studio Tools for Office 2005:

Best of Blogs: Visual Studio 2005 Tools for Offic
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/htm
l/odc_landvsto2005_ta.asp


Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16

Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx

> Hi,
> I have a Word Template project created using VSTO 2005.
[quoted text clipped - 6 lines]
> Many Thanks in advance,
> ZK.
ZK - 19 May 2005 18:59 GMT
Hi Ken,
Thanks for the reply.
But the problem still remains :-(

If the document is protected automatically, how is the User able to
edit all parts of the document which opens when the project is run ?

I do not want the document to be read-only.
How do I allow the user to edit only selected parts of the document.
eg : Those parts which are contained within specific XML tags.

Please help.

Thanks,
ZK.
ZK - 19 May 2005 19:02 GMT
Hi Ken,
Thanks for the reply.
But the problem still remains :-(

If the document is protected automatically, how is the User able to
edit all parts of the document which opens when the project is run ?

I do not want the document to be read-only.
How do I allow the user to edit only selected parts of the document.
eg : Those parts which are contained within specific XML tags.

Please help.

Note : On my machine, I was not able to open the VS Help file link sent
in your earlier post. Is this help page available on the net ?

Thanks,
ZK.
Ken Laws [MSFT] - 20 May 2005 15:08 GMT
Hi ZK,

Below is a link to the help topic online.

http://whidbey.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstc
ore/html/a25472ad-03f0-4804-9d19-e5ff71340d49.asp


Basically what I did was to mark the sections of the document that I wanted
the user to be able to edit while the Word template was open from within
Visual Studio.

Then once the solution was built and ready to be deployed, I opened the
template from the build folder using Microsoft Word outside of Visual Studio
and was able to click on the "Yes, Start Enforcing Protection" button which
then prompted me to set a password, thereby enabling protection.

If you have any questions please let me know via the posting.

Regards,

Ken Laws
Microsoft Support


This posting is provided "AS IS" with no warranties, and confers no rights.

For more information regarding Visual Studio Tools for Office 2005:

Best of Blogs: Visual Studio 2005 Tools for Offic
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/htm
l/odc_landvsto2005_ta.asp


Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16

Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx

> Hi Ken,
> Thanks for the reply.
[quoted text clipped - 14 lines]
> Thanks,
> ZK.
ZK - 31 May 2005 09:17 GMT
Hi Ken,

This solution works fine.

Thanx a lot for the help.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.