Hi all,
I am writing a VB application for Word 97. The application merges several
prewritten Word documents based on the user selection. For example, if the
user selects to generate certain type of document in the application, I
would like to generate a new document at runtime by merging DoumentA.doc ,
DocumentB.doc and DocumentC and display it to the user. I can do this
without any problem. But now I need to password protect the contents coming
from the DocumentC.doc in the new document. How can I do this?
Thanks.
-Nikhil

Re: protecting document - word'97 by Jonathan

Jonathan
Fri Oct 15 09:53:07 CDT 2004


"Nikhil Patel" <donotspam@nospaml.com> wrote in message
news:Oe%23qEGssEHA.2668@TK2MSFTNGP12.phx.gbl...
> Hi all,
> I am writing a VB application for Word 97. The application merges
> several prewritten Word documents based on the user selection. For
> example, if the user selects to generate certain type of document in the
> application, I would like to generate a new document at runtime by merging
> DoumentA.doc , DocumentB.doc and DocumentC and display it to the user. I
> can do this without any problem. But now I need to password protect the
> contents coming from the DocumentC.doc in the new document. How can I do
> this?
> Thanks.
> -Nikhil
>

What is the password protection supposted to prevent?


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Re: protecting document - word'97 by Nikhil

Nikhil
Fri Oct 15 10:22:10 CDT 2004

Hi Jonathan,
Thanks for your reply. I need to prevent users from editing the contents
coming from DocumentC but allow them to edit contents coming from DocumentA
and DocumentB.
Thanks.


"Jonathan West" <jwest@mvps.org> wrote in message
news:OfK71jssEHA.3460@TK2MSFTNGP15.phx.gbl...
>
> "Nikhil Patel" <donotspam@nospaml.com> wrote in message
> news:Oe%23qEGssEHA.2668@TK2MSFTNGP12.phx.gbl...
>> Hi all,
>> I am writing a VB application for Word 97. The application merges
>> several prewritten Word documents based on the user selection. For
>> example, if the user selects to generate certain type of document in the
>> application, I would like to generate a new document at runtime by
>> merging DoumentA.doc , DocumentB.doc and DocumentC and display it to the
>> user. I can do this without any problem. But now I need to password
>> protect the contents coming from the DocumentC.doc in the new document.
>> How can I do this?
>> Thanks.
>> -Nikhil
>>
>
> What is the password protection supposted to prevent?
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup



Re: protecting document - word'97 by Jonathan

Jonathan
Fri Oct 15 10:29:24 CDT 2004


"Nikhil Patel" <donotspam@nospaml.com> wrote in message
news:OiDq$qssEHA.2192@TK2MSFTNGP14.phx.gbl...
> Hi Jonathan,
> Thanks for your reply. I need to prevent users from editing the
> contents coming from DocumentC but allow them to edit contents coming from
> DocumentA and DocumentB.
> Thanks.

Then insert the contents of DocumentC into a separate Section within the
document, and then protect that section for forms.

But be aware that this is not a security measure, it is only proof against
accidental modification. Inserting the protected document into a blank
document using the Insert File feature will cause all the protection to be
stripped off.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Re: protecting document - word'97 by Nikhil

Nikhil
Fri Oct 15 11:03:51 CDT 2004

Hi Jonathan,
I tried the following line:
sectionDest.ProtectedForForms = True

But it wtill allows me to edit the section.

Thanks.
Nikhil

"Jonathan West" <jwest@mvps.org> wrote in message
news:eJF$d3ssEHA.820@TK2MSFTNGP12.phx.gbl...
>
> "Nikhil Patel" <donotspam@nospaml.com> wrote in message
> news:OiDq$qssEHA.2192@TK2MSFTNGP14.phx.gbl...
>> Hi Jonathan,
>> Thanks for your reply. I need to prevent users from editing the
>> contents coming from DocumentC but allow them to edit contents coming
>> from DocumentA and DocumentB.
>> Thanks.
>
> Then insert the contents of DocumentC into a separate Section within the
> document, and then protect that section for forms.
>
> But be aware that this is not a security measure, it is only proof against
> accidental modification. Inserting the protected document into a blank
> document using the Insert File feature will cause all the protection to be
> stripped off.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup



Re: protecting document - word'97 by Jonathan

Jonathan
Sat Oct 16 17:22:06 CDT 2004


"Nikhil Patel" <donotspam@nospaml.com> wrote in message
news:ucLESCtsEHA.3532@TK2MSFTNGP15.phx.gbl...
> Hi Jonathan,
> I tried the following line:
> sectionDest.ProtectedForForms = True
>
> But it wtill allows me to edit the section.

You need then to protect the document using this line of code


ActiveDocument.Protect Password:="", NoReset:=False, Type:= _
wdAllowOnlyFormFields


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup