locked Header & Footer

G

Guest

hi community

is there a way to make, say, my header and footer "locked" ?
what I am saying is,
I wanted my document area to be able to modify but I do not want my header
and Footer to be able to modify ?
if there is a way, how can i go about it, any assistance much appreciated :)

thanks community :)
 
G

Guest

10s Stefan Blom for your replied :) much appreciated.

I went to the site and view and copied the code and
Open my word doc
went into the VBE
at the project window, i selected my Project (the doc where I wanted to
"lock" the header and footer)
as instructed, I inserted a Module under the Project (the doc)
and
pasted the code into the window
save and closed VBE
went back to my document but the Header and Footer still able to be modified?
perhaps my procedure of doing is wrong,
(I am not good at all when using Macro stuff...)
can assist further on this..:)

thanks again
and
to all community as well :)
 
G

Guest

10s Lene Fredborg for the replied :) much appreciated
as
i got similar assistance, when to site and do what as advise
but
my header and footer still not protected ???
there are 3 sections, do i copy all the 3
insert a module under my document project
?
I am not good at VBA macro at all
can assist further on this ?

thanks
and to all community as well :)
 
S

Stefan Blom

Make sure that you paste the code into the built-in ThisDocument
module of the attached *template.*

--
Stefan Blom
Microsoft Word MVP


in message
 
G

Guest

I will try to explain a little more:

You must copy all three macros to the VBE (starting with "Option Explicit"
and to the end of the article).
If you copy and paste all three macros in one operation, and if dotted
separator lines appear _red_ in the VBE, either delete those lines or insert
a ' (single quote) in the start of the lines (which will change the lines to
comments).

The macros are supposed to be inserted in a _template_ (.dot) and will work
in all documents (.doc) based on that template and in the template itself.
What the macros do:
If you try to go to the header or footer of a document based on the
template, the macros will prevent this by returning to the main body of the
document at once.

Important: When you have inserted the macros in the VBE and saved, you need
to close the template and open it again (or create a document based on the
template) in order to test the effect. The macros will not be able to run
until you have done this.

If you later need to edit the header and/or footer of the template, you need
access to the header/footer - i.e. you need to prevent the macros from
running while editing. You can do this by pressing and holding the Shift key
when you _open_ the template. Alternatively, you can go to the VBE and
comment the macro "wdApp_WindowSelectionChange" while editing (i.e. put
single quotes in front of the code lines).

Hope this helps.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
G

Guest

thank you very much 4 ur generosity of the explaination :) very much
appreciated for your action :)

I read your explaination few x but yet to try will do that later

thanks again

and
also to all in the community

:)
 

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