$objRange = $wordDoc.Bookmarks.Item("lastname").Range
$objRange.Text = "wright"
# attempt to protect the doc here:
$wordDoc.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
$filename = $NewDocName
$wordDoc.SaveAs([REF]$filename)
$wordDoc.Close()
$msWord.Application.Quit()
Thanks,
Jeff
--
--------------------------------- --- -- -
Posted with NewsLeecher v4.0 Final
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -
can use:
$wordDoc.Unprotect()
$wordDoc.Protect("wdAllowOnlyFormFields")
Your Post was inspiring to me. Thanks.
But I have another question on this:
> We want the user to be able to fill out the
> fields but not accidentally edit the form itself.
Shouldn't you use for this very reason a template (dotx) instead of a
document (docx)?
As default dotx creates a NEW document based on the template and does not
OPEN the template itself. The template will remain unaffected.
Lg
Marcello