Left, Center, and Right aligned text in same header

R

Rich Pasco

I know this must be possible, but I sure can't figure out how.

I want to create page headers with some text left-aligned,
some text centered, and some text right-aligned. For example,
the document title on the left, the page number in the center,
and the section heading in the right, like this:

My Book page 13 Urgent Stuff

If I select any of the text in the header and click the alignment
icons in the toolbar, then the entire header is shifted.

What am I missing?

- Rich
 
T

Three Lefts

I know this must be possible, but I sure can't figure out how.

I want to create page headers with some text left-aligned,
some text centered, and some text right-aligned. For example,
the document title on the left, the page number in the center,
and the section heading in the right, like this:

My Book page 13 Urgent Stuff

If I select any of the text in the header and click the alignment
icons in the toolbar, then the entire header is shifted.

What am I missing?

I doubt if you are missing anything.

The solution depends on what you want done with the middle part.

If you want it centered between the margins, then set a center-tab at
the midpoint, a right-tab at the right margin, and separate the three
parts with tab characters.

If you want the middle part centered between the left and right parts,
there is no good way to do that, as far as I know. I usually use the
method above and manually adjust the center tab. Less than ideal.

Another approach is to create a table having 1 row and 3 columns. Then
adjust the column widths as you like. This has the advantage that text
that is wider than the column will wrap, whereas it can cause havoc
with tabs. The downside is that you will get an extra paragraph after
the table. Word is incapable of ending a document part with a table.

Good luck
 
S

Suzanne S. Barnhill

By default, the Header and Footer styles have a center-aligned tab stop
centered between the margins and a right-aligned tab stop at the right
margin. If you have changed the document margins, you will need to move the
tab stops to the new correct location. Then type:

My Book<tab>page { PAGE }<tab>Urgent Stuff

where { PAGE } represents a PAGE field inserted using the Insert Page Number
button on the Header and Footer toolbar. For more, see
http://sbarnhill.mvps.org/WordFAQs/HeaderFooter.htm

FWIW, the article you referenced takes much the most difficult approach to
tabs; see http://word.mvps.org/FAQs/Formatting/SettingTabs.htm and
http://word.mvps.org/faqs/formatting/UsingRulers.htm for easier approaches.
 
R

Reitanos

If you find that setting the tabs is too much overhead, you can always
use a table with 3 cells and turn the border off.
 
T

Three Lefts

I know this must be possible, but I sure can't figure out how.

I want to create page headers with some text left-aligned,
some text centered, and some text right-aligned. For example,
the document title on the left, the page number in the center,
and the section heading in the right, like this:

My Book page 13 Urgent Stuff

If I select any of the text in the header and click the alignment
icons in the toolbar, then the entire header is shifted.

What am I missing?

- Rich

I just remembered another way to approach your problem. You can
separate the three parts with n spaces, then center (Ctrl-E) the whole
line. Then add an equal number of spaces to the two gaps until the
left and right parts are as close to the margins as they can get. I
usually keep adding spaces until the line wraps, then delete the last
space or two. This will center the middle part between the other two
parts. It may not perfectly align the left ahd right parts with the
margins.
 
S

Suzanne S. Barnhill

This is an absurd way to achieve a simple task, but if you're going to do it
this way, you can equally well insert a single space between the parts,
nonbreaking spaces within the parts, and a line break at the end of the
(Justified) line, formatting the paragraph mark as Hidden.

But if you're going to try to center text with spaces, you might as well go
back to a typewriter.
 
T

Three Lefts

This is an absurd way to achieve a simple task,

Absurd? Apparently, MVPs are allowed more latitude in being crabby
than are others. How come I am criticized for attacking M$FT, but you
are allowed to attack me -- and for no good reason. I offered a
solution that works and is simple to use. I admit that you have a
better solution, but mine is simpler (does not involve non-breaking
spaces, understanding the difference between a line break and a
paragraph mark, or hidden paragraph marks). I'd wager that if 100
random Word users were assigned to two groups and each group were
given one of these solutions, more of the group using my solution
would get it right and more quickly. I still agree that yours is
better, but mine is simpler.
but if you're going to do it
this way, you can equally well insert a single space between the parts,
nonbreaking spaces within the parts, and a line break at the end of the
(Justified) line, formatting the paragraph mark as Hidden.

That's a very clever solution. I hadn't thought of using non-breaking
spaces to make each part behave like a single word and then using
Justify to space them out evenly. The line break is required because
Word does not justify the last line of a paragraph, then the paragraph
mark, now on the next line, needs to be hiddne to prevent an extra
space (which will not be obvious in the source). It also works with
any number of parts and will adjust automatically if the margins
change, which is a problem with tabs. I'll add it to my toolkit.

Thanks.

But if you're going to try to center text with spaces, you might as well go
back to a typewriter.

This is also kinda crabby and it's inaccurate. I presume you are
making a reference to the old says when we had to count the number of
characters in a title, subtract that from the line width, divide by 2,
then enter that number of spaces before the title to get it centered.
My suggestion involved no counting or dividing. Just add a few spaces
in one gap then add the same number (OK, I guess there is a little
counting, but it's much simpler) in the other gap. Repeat until it
looks OK.
 
S

Suzanne S. Barnhill

Both methods are absurd given that Word provides a simple, easy way to
accomplish the task (using centered and right-aligned tabs, which are
already present by default in the Header and Footer styles or can be easily
inserted using the ruler), but note that neither method actually centers the
center text; it merely creates the same amount of space between the central
portion and those on the left and right. Sometimes this might be desirable,
but usually it is not what is wanted.

To see an example of this, set a center-aligned tab in the center of the
line and a right-aligned tab at the right margin (or apply the Header or
Footer style). Then enter the following text (which might be a typical
second-page header for a letter):

John Q. Sample<tab>August 9, 2008<tab>2

Now do the same thing with the sample text and either of our methods and
observe the distance in spacing. You can judge which would be the more
pleasing in a given situation.

Also, FWIW, I did not criticize you for attacking Microsoft. I do believe
that the behavior you're seeing with owner files is anomalous and therefore
unexpected. In Word 2003, I've frequently been surprised to see that Word
will actually release xxx.doc for editing after I've saved it as yyy.doc
(despite the fact that ~$xxx.doc is still open).
 
T

Three Lefts

Both methods are absurd

I can see that you are now locked into labeling a solution that I find
useful as "absurd". My solution, and your alternative, are useful.
They may not be the most useful for most people, buyt they are not
"absurd". Your labeling of them as such is disrespectful. The other
solutions may be more useful for more people in more situations.
Different stgrokes for different folks. Clearly, you are more
interested in maligning my solution, than in looking for useful
solutions. That's unfortunate in someone who is supposed to providing
support.
given that Word provides a simple, easy way to
accomplish the task (using centered and right-aligned tabs, which are
already present by default in the Header and Footer styles or can be easily
inserted using the ruler), but note that neither method actually centers the
center text; it merely creates the same amount of space between the central
portion and those on the left and right. Sometimes this might be desirable,
but usually it is not what is wanted.

If "sometimes it is desirable", then how can it be absurd?
To see an example of this, set a center-aligned tab in the center of the
line and a right-aligned tab at the right margin (or apply the Header or
Footer style). Then enter the following text (which might be a typical
second-page header for a letter):

John Q. Sample<tab>August 9, 2008<tab>2

Now do the same thing with the sample text and either of our methods and
observe the distance in spacing. You can judge which would be the more
pleasing in a given situation.

I can see it being used both ways. Your way is probably more common,
but certainly not universal.
Also, FWIW, I did not criticize you for attacking Microsoft.

I didn't say you did. But other "MVPs" did. You did, however, label my
soliution as "absurd".
I do believe
that the behavior you're seeing with owner files is anomalous and therefore
unexpected.

I don't know about "anomalous", but it is certainly unexpected,
assuming that Word is well-coded. But it did happen and it has
happened before. I have even had situations where I had to close
Outlook to get a lock on a Word document freed up. The entire Office
quite is buggy as hell. Publisher is a joke. Outlook crashes easily.
Woody Leonhard has documented hundreds, if not thousands, of bugs in
Office products.
In Word 2003, I've frequently been surprised to see that Word
will actually release xxx.doc for editing after I've saved it as yyy.doc
(despite the fact that ~$xxx.doc is still open).

So it sounds like you agree with me that Word does not know how to
make appropriate use of the Windows file locking mechanism.
 
G

Graham Mayor

Suzanne said:
In Word 2003, I've frequently been
surprised to see that Word will actually release xxx.doc for editing
after I've saved it as yyy.doc (despite the fact that ~$xxx.doc is
still open).

Actually if you save xxx.doc as yyy.doc the lock file for xxx.doc is
released in Word 2003 (but not in 2007). The lock file is not released when
you save xxx.doc as yyy.docx, and that is true for both Word versions. Is
this a fatal flaw? Of course not - at best it is a minor irritation, and
despite using Word 2007 for over a year, I would not have even been aware of
it had not the OP raised such a fuss about it.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

Three Lefts

Actually if you save xxx.doc as yyy.doc the lock file for xxx.doc is
released in Word 2003 (but not in 2007). The lock file is not released when
you save xxx.doc as yyy.docx, and that is true for both Word versions.

A few ad hoc tests will not determine when it will or will not happen.
I'm not sure it always happens to me. I probably wouldn't notice if is
succeeded. In the case I reported, it forced me to close Word
entirely, involving 5-6 other unrelated files.
Is
this a fatal flaw?

I didn't say it was.
Of course not - at best it is a minor irritation,

I believe I said that it was an annoyance, but one man's minor
irritation is another's major irritation. Clearly it is not even a
minor irritation to you, since you say it has never happened to you.
and
despite using Word 2007 for over a year, I would not have even been aware of
it had not the OP raised such a fuss about it.

Translation: Since it doesn't happen to you, it is not important.
Sweet. Sorry to have made "such a fuss" over something that is clearly
broken and has been for 10-15 years. In the future, I'll try to only
post questions that significant to you. If I mess up, please just
ignore me. Deal?
 

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