If the information you want printed on every page is contained in the body
of the document, then format that information with a unique style or styles
and use a Styleref field in the header to reproduce it automatically in the
header without the need to update or for the user to touch the header.
See
http://gregmaxey.mvps.org/Repeating_Data.htm
Otherwise I would run with Gordon's suggestion and create a userform to
collect the date and write it to the header. Userforms are a bit complicated
to explain in a text forum such as this, but for the basics, see Word MVP
FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm
for a more in depth explanation, see
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm
You could also achieve something suitable with a more simple macro along the
lines of
Sub AutoNew()
Dim oHeader As Range
Set oHeader = ActiveDocument. _
Sections(1).Headers(wdHeaderFooterPrimary).Range
sText = InputBox("Enter Customer Information")
sText = sText & Chr(32) & _
InputBox("Enter Job Information")
With oHeader
.Text = "John Smith Widgets Ltd" & vbTab & sText
.Font.name = "Arial"
.Italic = True
.Font.Size = "10"
.ParagraphFormat.Alignment = wdAlignParagraphRight
End With
End Sub
saved in the document template. When a new document is created from the
template, the information is added to the company name - here "John Smith
Widgets Ltd" and formatted as right aligned 10 point Arial Italic in the
primary document header - see
http://www.gmayor.com/installing_macro.htm
There are lots of ways of inserting data based on information supplied by a
user - see also
http://www.gmayor.com/SelectFile.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Gordon, Thanks for the feedback. I am trying to avoid the user from
having to mess with the header. However.... if one or both of your
suggestions prompts them to fill in fields somehow that will
automatically fill into the header that would be great!
Unfortunately the job information is required to print on the top of
every page of the proposal.
My follow up to you: Which method will be easier to set up? I have
just begun learning and playing with code in Excel. I have not use
VBA for Word at all.
Can you point me in the direction to either a website or any
reference you recommend that would help walk me through either
scenario?
Thanks again for the feedback. I think either method sounds very
do-able! Thanks, Ken.
Gordon Bentley-Mix at news.microsoft.com said:
I can think of several ways to approach this problem, but the
easiest way still involves using the header, as it provides the
functionality you require - "a paragraph or table even, [that]
repeat
at the top of every page" - 'natively' without a lot fuss
and bother. Is there any reason that you can't _add_ stuff to the
header? Or maybe have the company information appear just on the
first page and the header on subsequent pages be different?
Here's what I'm thinking:
Set up the template to use a different first page header, and make
this header display the company info as required. On the first page
of the template, insert ASK or FILLIN fields to prompt for the
customer and job information. Then in the header on the second and
subsequent pages, remove the company info (or retain it if you must
have it there) and insert cross-references to these fields.
Another approach (my preferred method - but then I'm a VBA guy at
heart ;-P) would be to create a simple UserForm in VBA to prompt for
the customer and job information, and then add functionality to the
existing header to display this information. You would have to
modify the existing header to support this - a couple of bookmarks,
form fields, document variable fields or document property fields
would do the job - but you could retain the current header info on
all pages. Of course, this approach requires writing some VBA code,
and I understand if you're not comfortable with this.
In both cases, you would avoid the problem with asking the user to
update the header, but it would still involve modifying the header
in some way. If this is absolutely not an option, then the solution
becomes much more difficult and is probably beyond the scope of any
discussion we would want to have here.
--
Cheers!
Gordon Bentley-Mix
Word MVP
Please post all follow-ups to the newsgroup.
Read the original version of this post in the Office Discussion
Groups - no membership required!
KJ said:
I'm trying to build a template for a co-worker. It's a proposal
for bidding jobs so I need the Customer and Job information to
repeat at the top of every page.
I know about using a header, but right now our header is our
company info.
Also, this guy's not real saavy so I think updating a header every
time he fills this thing out would put him over the edge!
Is there a way to have a paragraph or table even, repeat at the top
of every page, SEPARATE from the Header function?
Thanks for any help!!