Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default How to align text left, center, right?

I have 3 fields in the footer of a template (name, title, date). The
date is a date field. The name and title are custom document
variables.

I would like all 3 on the same line in the footer with the name left
justified, the date right justified, and the title centered in the
remaining space. The name may be short or quite long. Same with the
title. Some examples:

nnnnnnnn tttttttttt mm/dd/yy
nnnnnnnnnnnnnnnnnnnnn ttttt mm/dd/yy
nnnnnnn ttttttttttttttttttt mm/dd/yy

Is there a way to do that?

The document has 7-8 sections each with a different footer.

What I have been doing is defining two tabs: one at the right margin
and one about in the center. Then, after I set the document variables,
I manually edit the footers in each section and adjust the center tab.

Is there a way to do that automatically?

Thanks

--
Running Word 2000 SP-3 on Windows 2000
  #2   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
 
Posts: n/a
Default How to align text left, center, right?

Not with a variable pitch font.

--
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

"LurfysMa" wrote in message
...
I have 3 fields in the footer of a template (name, title, date). The
date is a date field. The name and title are custom document
variables.

I would like all 3 on the same line in the footer with the name left
justified, the date right justified, and the title centered in the
remaining space. The name may be short or quite long. Same with the
title. Some examples:

nnnnnnnn tttttttttt mm/dd/yy
nnnnnnnnnnnnnnnnnnnnn ttttt mm/dd/yy
nnnnnnn ttttttttttttttttttt mm/dd/yy

Is there a way to do that?

The document has 7-8 sections each with a different footer.

What I have been doing is defining two tabs: one at the right margin
and one about in the center. Then, after I set the document variables,
I manually edit the footers in each section and adjust the center tab.

Is there a way to do that automatically?

Thanks

--
Running Word 2000 SP-3 on Windows 2000



  #3   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill
 
Posts: n/a
Default How to align text left, center, right?

There's a way to do this, but it's a bit finicking:

1. Format the paragraph as Justified.

2. Type the name. Use nonbreaking spaces between words. Follow the name with
an ordinary space.

3. Type the title, again using nonbreaking spaces internally and an ordinary
space at the end.

4. Type the date, again using nonbreaking spaces (if any).

5. Press Shift+Enter.

6. If the blank line thus produced causes a problem, select just the
paragraph mark and format it as 1 point or Hidden.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"LurfysMa" wrote in message
...
I have 3 fields in the footer of a template (name, title, date). The
date is a date field. The name and title are custom document
variables.

I would like all 3 on the same line in the footer with the name left
justified, the date right justified, and the title centered in the
remaining space. The name may be short or quite long. Same with the
title. Some examples:

nnnnnnnn tttttttttt mm/dd/yy
nnnnnnnnnnnnnnnnnnnnn ttttt mm/dd/yy
nnnnnnn ttttttttttttttttttt mm/dd/yy

Is there a way to do that?

The document has 7-8 sections each with a different footer.

What I have been doing is defining two tabs: one at the right margin
and one about in the center. Then, after I set the document variables,
I manually edit the footers in each section and adjust the center tab.

Is there a way to do that automatically?

Thanks

--
Running Word 2000 SP-3 on Windows 2000


  #4   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default How to align text left, center, right?

On Sun, 25 Jun 2006 17:27:55 +0200, "Doug Robbins - Word MVP"
wrote:

Not with a variable pitch font.


I infer that you are talking about a macro that could count the
characters in the 3 fields and then divide the remaining soace
equally, right?

Not that I'm going to do this, but isn't there some VBA command that
willr eturn the width of a text string in a given font and size?

--
Running Word 2000 SP-3 on Windows 2000
  #5   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default How to align text left, center, right?

On Sun, 25 Jun 2006 10:51:51 -0500, "Suzanne S. Barnhill"
wrote:

There's a way to do this, but it's a bit finicking:

1. Format the paragraph as Justified.

2. Type the name. Use nonbreaking spaces between words. Follow the name with
an ordinary space.

3. Type the title, again using nonbreaking spaces internally and an ordinary
space at the end.

4. Type the date, again using nonbreaking spaces (if any).

5. Press Shift+Enter.

6. If the blank line thus produced causes a problem, select just the
paragraph mark and format it as 1 point or Hidden.


Now that's a clever solution. I'll fiddle around with it.

Back in the "old days" on IBM mainframes, we used to have a word
processor that has a "Split" command. You could enter two or more text
strings separated by delimiters and the program would divide the
available space evenly. This was a markup program (not wysiwyg) so we
would imbed controls:

..foot on
..space 2
..split /String one/String two/String three/String four/
..foot off

We used that one a lot.

--
Running Word 2000 SP-3 on Windows 2000


  #6   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman
 
Posts: n/a
Default How to align text left, center, right?

On Sun, 25 Jun 2006 09:38:56 -0700, LurfysMa
wrote:

On Sun, 25 Jun 2006 17:27:55 +0200, "Doug Robbins - Word MVP"
wrote:

Not with a variable pitch font.


I infer that you are talking about a macro that could count the
characters in the 3 fields and then divide the remaining soace
equally, right?

Not that I'm going to do this, but isn't there some VBA command that
willr eturn the width of a text string in a given font and size?


For the record, no, VBA doesn't have any "how wide is this string"
function that doesn't require inserting the string first. Its big
brother VB does, as do the heavy-duty languages like C++ and C#, but
VBA has always been without it. Where it is available, it's a fairly
complicated procedure -- you have to get a graphic context (a memory
area loaded with the properties of the current printer), create a font
object, pass the string and the font object to the function and get
back a width in pixels, convert that to the rendering width on the
page, and finally release the font and context objects.

The closest you can get in VBA is to insert the string in the document
and then call
Selection.Information(wdHorizontalPositionRelative ToTextBoundary),
which returns the position of the cursor in points from the left
margin.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
  #7   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
 
Posts: n/a
Default How to align text left, center, right?

And in those days, you used fixed width fonts and you knew exactly how many
characters fitted onto one line.

--
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

"LurfysMa" wrote in message
...
On Sun, 25 Jun 2006 10:51:51 -0500, "Suzanne S. Barnhill"
wrote:

There's a way to do this, but it's a bit finicking:

1. Format the paragraph as Justified.

2. Type the name. Use nonbreaking spaces between words. Follow the name
with
an ordinary space.

3. Type the title, again using nonbreaking spaces internally and an
ordinary
space at the end.

4. Type the date, again using nonbreaking spaces (if any).

5. Press Shift+Enter.

6. If the blank line thus produced causes a problem, select just the
paragraph mark and format it as 1 point or Hidden.


Now that's a clever solution. I'll fiddle around with it.

Back in the "old days" on IBM mainframes, we used to have a word
processor that has a "Split" command. You could enter two or more text
strings separated by delimiters and the program would divide the
available space evenly. This was a markup program (not wysiwyg) so we
would imbed controls:

.foot on
.space 2
.split /String one/String two/String three/String four/
.foot off

We used that one a lot.

--
Running Word 2000 SP-3 on Windows 2000



  #8   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default How to align text left, center, right?

On Sun, 25 Jun 2006 22:08:55 +0200, "Doug Robbins - Word MVP"
wrote:

And in those days, you used fixed width fonts and you knew exactly how many
characters fitted onto one line.


You may be right. It's been so long. But I think we did have
proportional space fonts as well.

In any case, it would not be much harder for the word processor to do
the "split" function with proportional space fonts than monospace. The
work processor has to know "exactly how many characters will fit on a
line" regardless.

--
Running Word 2000 SP-3 on Windows 2000
  #9   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default How to align text left, center, right?

Not so - each character will have a different width eg the letter i takes up
less space than the letter w.

iiiiiiiiii
wwwwwwwwww

The line wrap is set by a variety of factors not least of which is the
current printer driver.

Why make things unnecessarily difficult for yourself? Put a centre aligned
tab at the centre of the page
and a right aligned tab at the right margin. The texts will align to the
page.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


LurfysMa wrote:
In any case, it would not be much harder for the word processor to do
the "split" function with proportional space fonts than monospace. The
work processor has to know "exactly how many characters will fit on a
line" regardless.



  #10   Report Post  
Posted to microsoft.public.word.newusers
LurfysMa
 
Posts: n/a
Default How to align text left, center, right?

On Mon, 26 Jun 2006 08:17:25 +0300, "Graham Mayor"
wrote:

LurfysMa wrote:
In any case, it would not be much harder for the word processor to do
the "split" function with proportional space fonts than monospace. The
work processor has to know "exactly how many characters will fit on a
line" regardless.


Not so - each character will have a different width eg the letter i takes up
less space than the letter w.


Of course. That's why it's a proportional font.

But each character of each font includes information on its width. The
WP knows how wide the line is and it knows how wide each character is
and it can add and subtract. Nothing more is needed. If this weren't
so, the WP would not be able to format lines.

So, to do my split function, all that is needed is for the WP to add
up the widths of the three text strings, subtract that from the line
length, and divide by 2.

iiiiiiiiii
wwwwwwwwww

The line wrap is set by a variety of factors not least of which is the
current printer driver.

Why make things unnecessarily difficult for yourself? Put a centre aligned
tab at the centre of the page
and a right aligned tab at the right margin. The texts will align to the
page.


That won't work. The left and center strings can be very short or very
wide. That's the whole problem. The left string can be wider than half
the line width. I don't want the middle string centered on the line
width, I want it centered on the space between the right edge of te
left string and the left edge of the right string.


--
Running Word 2000 SP-3 on Windows 2000


  #11   Report Post  
Posted to microsoft.public.word.newusers
Bob S Bob S is offline
external usenet poster
 
Posts: 5
Default How to align text left, center, right?

One scheme that might work, or at least be marginally easier, is to
use a one-row three-column table in the footer.

Make the table width 100% and turn off borders.

Put in your field codes.

Make the left column left aligned, drag the width small, and turn off
text wrapping.

Make the center column center aligned.

Make the right column right aligned, drag the width small, and turn
off text wrapping.

If you are really lucky, when you later evaluate the fields the left
and right table columns will expand to fit their contents and
everything will work like magic. If you are less lucky at least you
will only have to drag the column edges to make the left and right
cells minimum size for their contents, which might be easier than
trying to position the center tab stop.

Bob S





On Sun, 25 Jun 2006 07:29:59 -0700, LurfysMa wrote:

I have 3 fields in the footer of a template (name, title, date). The
date is a date field. The name and title are custom document
variables.

I would like all 3 on the same line in the footer with the name left
justified, the date right justified, and the title centered in the
remaining space. The name may be short or quite long. Same with the
title. Some examples:

nnnnnnnn tttttttttt mm/dd/yy
nnnnnnnnnnnnnnnnnnnnn ttttt mm/dd/yy
nnnnnnn ttttttttttttttttttt mm/dd/yy

Is there a way to do that?

The document has 7-8 sections each with a different footer.

What I have been doing is defining two tabs: one at the right margin
and one about in the center. Then, after I set the document variables,
I manually edit the footers in each section and adjust the center tab.

Is there a way to do that automatically?

Thanks


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
align text center and right on the same line Annette Frank Microsoft Word Help 9 May 5th 23 08:49 AM
center justified text not printing correctly sudbury99 Microsoft Word Help 1 March 28th 06 11:49 PM
Wandering text box Jim K Microsoft Word Help 7 December 23rd 05 11:27 PM
Word 2000: need to expand the header to the left; left text margi. [email protected] Page Layout 1 December 14th 04 07:54 PM
textbox to normal text Jack Sons New Users 16 December 5th 04 03:44 PM


All times are GMT +1. The time now is 08:15 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"