How can I edit headers/footers in a protected form?

L

lschro

How can I edit a header or footer in an online document protected for forms?
The fill-in the blank form fields are on page 1, but on the next pages the
sections are unprotected to allow paragraphs of information to be inserted.
Ex. - After page 1 the Footer needs to be changed in each section: Exhibit A
Page 1 of 1, then Exhibit B Page 1 or 2, etc. I don't want to unprotect the
document because sometimes the information in one or two of the form fields
needs to be changed and re-protecting the doc. resets the form fields. Is
there a simple macro that would unprotect the headers/footers and allow
editing without resetting the form fields? Thank you.
 
C

Chuck

You have to unprotect the form, edit the header/footer then reprotect it. To
prevent losing data already in the form fields use the NoReset parameter.
You'll need to provide the password in code or leave the Password parameter
off in which case the user will be prompted for a password. The
section-specific protect/unprotect settings should persist without your
having to specify them again.

To unprotect:

ActiveDocument.Unprotect Password:=""

To protect with NoReset:

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

lschro

Thank you, Chuck. I'm sure this will work for what I need. I am teaching
myself how to write macros. This will take the guesswork out of trying to
make it work. Thank you.
 
S

Sassy3fan

Im just trying learning all this as well. What I need to do is edit the
headers on each page...but when I change page two, it also changes page one
and three...how can I edit each page to have different data? Example I want
page one to read Genisis: 1-2 and page two to read Genisis: 3-4 etc. Thanks
for any help you can give me.
 
D

Doug Robbins - Word MVP

Check out the use of the StyleRef field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Graham Mayor

Shouldn't that be Genesis?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top