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.