Hi I have a form in Word that populates with information from a financial
processing application You set up the .dot file by placing for instance
[fname] where you would want the particular customers first name to appear.
There are only a limited number of fields to pre-populate as well as other
areas of the form that the user can either fill out on screen or by hand. I'd
like to be able to allow users to click in a form field and enter the
unavailable data; however, when I set up all the form fields and protect the
document as form the pre populated data stops pre-populating and only shows
the [fname] instead of the actual customers name. I have tried sectioning the
document...same result.
Is there a way to open the form, pre-populate the data and then protect as
form????
Any other suggestions?


--
Thanks
Neil

Re: Form protection by Jay

Jay
Wed Mar 29 19:50:12 CST 2006

Hi Neil,

Yes, that's exactly what you need to do.

If the template is protected, so that a new document based on it is
protected at creation time, then the first thing the populating
procedure needs to do is

myDoc.Unprotect

Then it fills in the pre-populated fields. Finally it should do

myDoc.Protect Type Type:=wdAllowOnlyFormFields

If you need to unprotect and reprotect a form that already has
user-entered data in the form fields, then the .Protect command should
be

myDoc.Protect Type Type:=wdAllowOnlyFormFields, NoReset:=True

to avoid clearing the form fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Wed, 29 Mar 2006 13:42:04 -0800, Neil
<Neil@discussions.microsoft.com> wrote:

>Hi I have a form in Word that populates with information from a financial
>processing application You set up the .dot file by placing for instance
>[fname] where you would want the particular customers first name to appear.
>There are only a limited number of fields to pre-populate as well as other
>areas of the form that the user can either fill out on screen or by hand. I'd
>like to be able to allow users to click in a form field and enter the
>unavailable data; however, when I set up all the form fields and protect the
>document as form the pre populated data stops pre-populating and only shows
>the [fname] instead of the actual customers name. I have tried sectioning the
>document...same result.
>Is there a way to open the form, pre-populate the data and then protect as
>form????
>Any other suggestions?

RE: Form protection by FredKruger

FredKruger
Thu Mar 30 00:19:01 CST 2006

Hi Neil

I also use the protection but I also have templates where i want people to
add more text than through a fromfield so i use sections in the document
which can be unprotected.

So i use the following to reprotect a document with different sections in so
all the odd sections are proteced and all evens are un protected if its any
use to you.

Sub reprotect()
Dim sPassword As String

For Each oSection In ActiveDocument.Sections
'If the section's index / 2 <> 0 (odd)
If oSection.Index Mod 2 <> 0 Then
'protection needed
oSection.ProtectedForForms = True
Else
'no protection needed(even)
oSection.ProtectedForForms = False
End If
Next
If lProtected <> wdNoProtection Then
sPassword = "kruger"

ActiveDocument.Protect Type:=lProtected, noreset:=True, Password:=sPassword
End If
End Sub

Fred


"Neil" wrote:

> Hi I have a form in Word that populates with information from a financial
> processing application You set up the .dot file by placing for instance
> [fname] where you would want the particular customers first name to appear.
> There are only a limited number of fields to pre-populate as well as other
> areas of the form that the user can either fill out on screen or by hand. I'd
> like to be able to allow users to click in a form field and enter the
> unavailable data; however, when I set up all the form fields and protect the
> document as form the pre populated data stops pre-populating and only shows
> the [fname] instead of the actual customers name. I have tried sectioning the
> document...same result.
> Is there a way to open the form, pre-populate the data and then protect as
> form????
> Any other suggestions?
>
>
> --
> Thanks
> Neil