password protect template

Y

yarasin

For my sins I volunteered to set up templates for an organisation and all I
can say is aaagh!

The first template is a letterhead which I have got sorted as far as the set
up goes (by following the letterhead/template tutorial link posted on the
groups).

But I can't get the password protect to work! Have password protected the
template but when I open the file in 'read only' I can still amend the
headers and footers.

What am I doing wrong?

Mags
 
Y

yarasin

Hi Suzanne

Thanks very much for the link (am using word 2000). Do you have a link for
using code in Word please as I have absolutely no idea what/where I am
supposed to put the code?
Also, do I have to put all the code shown on the link you showed me? Look
like there are three different codes but again, I have no idea!

Thanks again.
 
G

Guest

Hi Yarasin,

A link for learning a bit about macro code is
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm.

In the case of the article Suzanne cited, the code belongs in the
ThisDocument module of the Normal.dot template. When you open the VBA editor,
look in the Project Explorer pane on the left (if it isn't visible, use the
View menu to display it). Expand the Normal icon and double-click the
ThisDocument icon. Then paste the code from the article (yes, all three
subroutines) into the big blank code window on the right. Don't copy the
lines that separate the subroutines -- those would cause errors if you pasted
them in.

Regards,
Jay Freedman
Microsoft Word MVP
 
Y

yarasin

Hi Jay

Many thanks for that (have had a read of the link but OMG, too technical for
me, totally out my depth there!).
Followed your instructions and pasted the code but has made no difference,
can still alter the header and footer. Am obviously doing something wrong
but don't know what.

Would really appreciate any suggestions of what to double check (whilst I
kick my kind-hearted old self for offering to do this!)
 
Y

yarasin

Thanks for the tutorial, I must be the idiot's idiot cause I still have a
couple of questions:

1)what has the macro name to be, the code that I have to insert has three
names before the ()
2)am I correct in that when stating the template/document that the macros
have to be saved in to select letterhead(template) which is the file that I
need to put these macros in
 
J

Jay Freedman

A few things we haven't discussed, but are important here:

1. I misspoke when I said the macros belong in your Normal.dot
template -- that would prevent you from getting into headers or
footers in any of your documents. Instead, they belong in the specific
templates you're creating for these particular types of document.
However, they do belong in the ThisDocument module of each of those
templates -- you can see ThisDocument listed under each template's
name in the Project Explorer pane of the VBA editor.

2. The protection doesn't take effect right away in the template as
soon as you paste in the code. First save and close the template. Then
create a new document based on the template (using File > New). That
document's header and footer should be protected. Open existing
documents based on the template (if you have any yet) and their
headers/footers should also be protected.

3. Just to be sure: When you open the VBA editor and look at the code,
there aren't any lines in red, are there? If there are, that indicates
a programming error.
 
G

Graham Mayor

The macros in the article are a group of routines. If you have the following
in your vba editor after following the instructions, select it there and
paste all the code from the link in its place:

Sub macroname()
'
' macroname Macro
' Macro created date by user
'

End Sub



You need to save this code in the document template for your letterhead.


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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Y

yarasin

Thanks Jay. Got it! :))

(Think I actually had it the first time but was unaware that I had to open a
new document based on the template.)

Thanks again for your time and advice, it is very much appreciated.
 
Y

yarasin

Thanks Graham - I've done it (at last!)


Graham Mayor said:
The macros in the article are a group of routines. If you have the following
in your vba editor after following the instructions, select it there and
paste all the code from the link in its place:

Sub macroname()
'
' macroname Macro
' Macro created date by user
'

End Sub



You need to save this code in the document template for your letterhead.


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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Charles Kenyon

Don't have an answer on the password protection. What, exactly, are you
trying to accomplish by protecting it? What you want to do may require a vba
solution and be cumbersome, or not. You may do it using protected forms
(online forms) protection as well.

For more on constructing letterhead, take a look at: How to set up
letterhead or some other document where you want one header on the first
page and a different header on other pages.
http://www.addbalance.com/word/headersfooters.htm This gives step-by-step
instructions. (It also has the following links)

Some other pages to look at:

Letterhead Tips and Instructions
http://home.earthlink.net/~wordfaqs/Letterhead.htm

Letterhead Textboxes and Styles tutorial
http://addbalance.com/word/download.htm#LetterheadTextboxesAndStylesTutorial

Template Basics
http://www.addbalance.com/usersguide/templates.htm

How to Create a Template - Part 2 - essential reading
http://www.mvps.org/word/FAQs/Customization/CreateATemplatePart2.htm

Word "Forms"
http://www.addbalance.com/word/wordwebresources.htm#Forms and

Word for Word Perfect Users
http://www.addbalance.com/word/wordperfect.htm if you are coming from a WP
environment (or even if you are not).

If you are interested in creating templates that will work with the letter
wizard or use that wizard, you should look at the chapter on Advanced
Document Formatting in Using Office 2003 (or whatever your version is),
Special Edition, by Ed Bott and Woody Leonhard. It has detailed instructions
including instructions on getting the fields you want from your Outlook
Contacts for addressing a letter. (Chapter 19 of SE Using Office 2003) You
should be able to get this through your public library or at Amazon.com
http://www.amazon.com/exec/obidos/ISBN=0789729555/balancecheckbookA/

Finally, take a look at the letter templates that come with Word. While they
are no great shakes as letterhead, they do use styles and AutoText lists
very well. If you use the same style names that are used in those templates
in your own letterhead for the same parts of the document, you will have
better luck with using the built-in AutoText entries in Word.

Hope this helps,
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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