Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
Herman
 
Posts: n/a
Default Problem with line numbering and footers

Good day,

I work with MS Word documents on a daily basis that is 100+ pages. The
formatting they require specify that the line numbering must be on the
right hand side of the page. Word can only place it on the left side. I
have created a text box linked to the header with the line numbering on
the right. Does anybody know of another way to do this?

The second problem is that the footer of every page must be the first
word of the next page. Is there an easy way to do this?

Regards.

  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom
 
Posts: n/a
Default Problem with line numbering and footers

"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+ pages.
The
formatting they require specify that the line numbering must be on
the
right hand side of the page. Word can only place it on the left
side. I
have created a text box linked to the header with the line numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult to get
your custom line numbers to line up with text, consider specifying a
fixed amount of line spacing (FormatParagraph, Indents and Spacing
tab) for the text in the text box as well as for the text in the main
body of the document.

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?


Create a character style (with no formatting, based on "underlying
properties") and apply it to the first word of each page. Then add the
STYLEREF "characterstylename_here" \l (backslash followed by lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first on a
page, since pages are created dynamically by Word as you add and
remove text, so you'd better apply the style when document formatting
is done (and you know what printer driver it will be used with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP



  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill
 
Posts: n/a
Default Problem with line numbering and footers

I don't believe a StyleRef field, even with the \l switch, will work here
because it is based on text on the current page, not the next page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+ pages.
The
formatting they require specify that the line numbering must be on
the
right hand side of the page. Word can only place it on the left
side. I
have created a text box linked to the header with the line numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult to get
your custom line numbers to line up with text, consider specifying a
fixed amount of line spacing (FormatParagraph, Indents and Spacing
tab) for the text in the text box as well as for the text in the main
body of the document.

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?


Create a character style (with no formatting, based on "underlying
properties") and apply it to the first word of each page. Then add the
STYLEREF "characterstylename_here" \l (backslash followed by lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first on a
page, since pages are created dynamically by Word as you add and
remove text, so you'd better apply the style when document formatting
is done (and you know what printer driver it will be used with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP




  #4   Report Post  
Posted to microsoft.public.word.pagelayout
Tony Jollans
 
Posts: n/a
Default Problem with line numbering and footers

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?


This technique for having page-level footers is shamelessly stolen from
poster "ML" in the word.vba.general newsgroup but I like it and am sure it
has potential.

The technique for extracting the first word on the page is suspect but I
hope will work.

In your Footer put the following:

{ If { Page } { NumPages } { DocVariable "P{ Page }" } }

Before saving, or printing, or whenever you want this to happen run this
code:

Sub GetFirstWordOnPage()

Dim oPage As Page
Dim oRect As Rectangle

Dim PageNo As Long

For Each oPage In ActiveWindow.ActivePane.Pages
For Each oRect In oPage.Rectangles

If oRect.RectangleType = wdTextRectangle Then
If oRect.Range.StoryType = wdMainTextStory Then

On Error Resume Next
ActiveDocument.Variables("P" & PageNo).Delete
On Error GoTo 0

ActiveDocument.Variables.Add "P" & PageNo, _
oRect.Range.Words(1)
Exit For

End If
End If

Next
PageNo = PageNo + 1
Next

End Sub

You'll need to ensure fields are updated for it to show. The code could be
amended to do that, or you could set the option to update fields before
printing.

--
Enjoy,
Tony


"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+ pages.
The
formatting they require specify that the line numbering must be on
the
right hand side of the page. Word can only place it on the left
side. I
have created a text box linked to the header with the line numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult to get
your custom line numbers to line up with text, consider specifying a
fixed amount of line spacing (FormatParagraph, Indents and Spacing
tab) for the text in the text box as well as for the text in the main
body of the document.

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?


Create a character style (with no formatting, based on "underlying
properties") and apply it to the first word of each page. Then add the
STYLEREF "characterstylename_here" \l (backslash followed by lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first on a
page, since pages are created dynamically by Word as you add and
remove text, so you'd better apply the style when document formatting
is done (and you know what printer driver it will be used with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP





  #5   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom
 
Posts: n/a
Default Problem with line numbering and footers

It did seem to work when I tested it (with the limitations stated in
my previous reply). This also seems consistent with the help topic
titled "Field codes: StyleRef field" (see the "STYLEREF field
location" section at
http://office.microsoft.com/en-us/as...861931033.aspx).

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
I don't believe a StyleRef field, even with the \l switch, will work

here
because it is based on text on the current page, not the next page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+

pages.
The
formatting they require specify that the line numbering must be

on
the
right hand side of the page. Word can only place it on the left
side. I
have created a text box linked to the header with the line

numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult to

get
your custom line numbers to line up with text, consider specifying

a
fixed amount of line spacing (FormatParagraph, Indents and

Spacing
tab) for the text in the text box as well as for the text in the

main
body of the document.

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?


Create a character style (with no formatting, based on "underlying
properties") and apply it to the first word of each page. Then add

the
STYLEREF "characterstylename_here" \l (backslash followed by

lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first on a
page, since pages are created dynamically by Word as you add and
remove text, so you'd better apply the style when document

formatting
is done (and you know what printer driver it will be used with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP









  #6   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill
 
Posts: n/a
Default Problem with line numbering and footers

When I try it, using three pages of dummy text with a character style
applied to the first word on each page, I get the following results:

Page 1: First word on page 2
Page 2: First word on page 2
Page 3: First word on page 3

I would actually expect page 1 to show the first word on page 1 as well
because the \l switch causes Word to search *the page* from bottom to top,
picking up the *last* appearance of the style *on the page.*

This is in Word 2003 SP2.

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

"Stefan Blom" wrote in message
...
It did seem to work when I tested it (with the limitations stated in
my previous reply). This also seems consistent with the help topic
titled "Field codes: StyleRef field" (see the "STYLEREF field
location" section at
http://office.microsoft.com/en-us/as...861931033.aspx).

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
I don't believe a StyleRef field, even with the \l switch, will work

here
because it is based on text on the current page, not the next page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+

pages.
The
formatting they require specify that the line numbering must be

on
the
right hand side of the page. Word can only place it on the left
side. I
have created a text box linked to the header with the line

numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult to

get
your custom line numbers to line up with text, consider specifying

a
fixed amount of line spacing (FormatParagraph, Indents and

Spacing
tab) for the text in the text box as well as for the text in the

main
body of the document.

The second problem is that the footer of every page must be the
first word of the next page. Is there an easy way to do this?

Create a character style (with no formatting, based on "underlying
properties") and apply it to the first word of each page. Then add

the
STYLEREF "characterstylename_here" \l (backslash followed by

lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first on a
page, since pages are created dynamically by Word as you add and
remove text, so you'd better apply the style when document

formatting
is done (and you know what printer driver it will be used with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP








  #7   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom
 
Posts: n/a
Default Problem with line numbering and footers

I just read the help topic again. My initial interpretation of the
help text was wrong; since StyleRef begings the search on the page it
is on, it should pick up the text in the first paragraph (and never
look on subsequent pages), no matter if the \l switch is used. You are
quite right about that!

However, I also tested again, in Word 2000, and I found that it does
behave the way I described in a previous message.

FWIW, even though I used a character style, the result also seems to
depend on the presence of paragraph marks in each paragraph where the
style is used. When I quickly created three pages by inserting section
breaks, I couldn't get the field (on any of the pages) to show
anything but the very *last* piece of text. Pressing Enter before each
break fixed that.

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
When I try it, using three pages of dummy text with a character

style
applied to the first word on each page, I get the following results:

Page 1: First word on page 2
Page 2: First word on page 2
Page 3: First word on page 3

I would actually expect page 1 to show the first word on page 1 as

well
because the \l switch causes Word to search *the page* from bottom

to top,
picking up the *last* appearance of the style *on the page.*

This is in Word 2003 SP2.

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

"Stefan Blom" wrote in message
...
It did seem to work when I tested it (with the limitations stated

in
my previous reply). This also seems consistent with the help topic
titled "Field codes: StyleRef field" (see the "STYLEREF field
location" section at
http://office.microsoft.com/en-us/as...861931033.aspx).

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
I don't believe a StyleRef field, even with the \l switch, will

work
here
because it is based on text on the current page, not the next

page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+

pages.
The
formatting they require specify that the line numbering must

be
on
the
right hand side of the page. Word can only place it on the

left
side. I
have created a text box linked to the header with the line

numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult

to
get
your custom line numbers to line up with text, consider

specifying
a
fixed amount of line spacing (FormatParagraph, Indents and

Spacing
tab) for the text in the text box as well as for the text in

the
main
body of the document.

The second problem is that the footer of every page must be

the
first word of the next page. Is there an easy way to do

this?

Create a character style (with no formatting, based on

"underlying
properties") and apply it to the first word of each page. Then

add
the
STYLEREF "characterstylename_here" \l (backslash followed by

lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first

on a
page, since pages are created dynamically by Word as you add

and
remove text, so you'd better apply the style when document

formatting
is done (and you know what printer driver it will be used

with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP











  #8   Report Post  
Posted to microsoft.public.word.pagelayout
Suzanne S. Barnhill
 
Posts: n/a
Default Problem with line numbering and footers

My test did not include any manual page breaks. I just inserted two blocks
of lorem ipsum text (enough to run onto a third page). It's possible that
the behavior in Word 2000 is actually a "bug" (since it is not behaving as
designed) that was corrected in a later version.

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

"Stefan Blom" wrote in message
...
I just read the help topic again. My initial interpretation of the
help text was wrong; since StyleRef begings the search on the page it
is on, it should pick up the text in the first paragraph (and never
look on subsequent pages), no matter if the \l switch is used. You are
quite right about that!

However, I also tested again, in Word 2000, and I found that it does
behave the way I described in a previous message.

FWIW, even though I used a character style, the result also seems to
depend on the presence of paragraph marks in each paragraph where the
style is used. When I quickly created three pages by inserting section
breaks, I couldn't get the field (on any of the pages) to show
anything but the very *last* piece of text. Pressing Enter before each
break fixed that.

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
When I try it, using three pages of dummy text with a character

style
applied to the first word on each page, I get the following results:

Page 1: First word on page 2
Page 2: First word on page 2
Page 3: First word on page 3

I would actually expect page 1 to show the first word on page 1 as

well
because the \l switch causes Word to search *the page* from bottom

to top,
picking up the *last* appearance of the style *on the page.*

This is in Word 2003 SP2.

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

"Stefan Blom" wrote in message
...
It did seem to work when I tested it (with the limitations stated

in
my previous reply). This also seems consistent with the help topic
titled "Field codes: StyleRef field" (see the "STYLEREF field
location" section at
http://office.microsoft.com/en-us/as...861931033.aspx).

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
I don't believe a StyleRef field, even with the \l switch, will

work
here
because it is based on text on the current page, not the next

page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message
oups.com...
Good day,

I work with MS Word documents on a daily basis that is 100+
pages.
The
formatting they require specify that the line numbering must

be
on
the
right hand side of the page. Word can only place it on the

left
side. I
have created a text box linked to the header with the line
numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it difficult

to
get
your custom line numbers to line up with text, consider

specifying
a
fixed amount of line spacing (FormatParagraph, Indents and
Spacing
tab) for the text in the text box as well as for the text in

the
main
body of the document.

The second problem is that the footer of every page must be

the
first word of the next page. Is there an easy way to do

this?

Create a character style (with no formatting, based on

"underlying
properties") and apply it to the first word of each page. Then

add
the
STYLEREF "characterstylename_here" \l (backslash followed by
lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the first

on a
page, since pages are created dynamically by Word as you add

and
remove text, so you'd better apply the style when document
formatting
is done (and you know what printer driver it will be used

with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP












  #9   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom
 
Posts: n/a
Default Problem with line numbering and footers

"Suzanne S. Barnhill" wrote:
It's possible that
the behavior in Word 2000 is actually a "bug" (since it is not
behaving as
designed) that was corrected in a later version.


Agreed.

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
My test did not include any manual page breaks. I just inserted two

blocks
of lorem ipsum text (enough to run onto a third page). It's possible

that
the behavior in Word 2000 is actually a "bug" (since it is not

behaving as
designed) that was corrected in a later version.

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

"Stefan Blom" wrote in message
...
I just read the help topic again. My initial interpretation of the
help text was wrong; since StyleRef begings the search on the page

it
is on, it should pick up the text in the first paragraph (and

never
look on subsequent pages), no matter if the \l switch is used. You

are
quite right about that!

However, I also tested again, in Word 2000, and I found that it

does
behave the way I described in a previous message.

FWIW, even though I used a character style, the result also seems

to
depend on the presence of paragraph marks in each paragraph where

the
style is used. When I quickly created three pages by inserting

section
breaks, I couldn't get the field (on any of the pages) to show
anything but the very *last* piece of text. Pressing Enter before

each
break fixed that.

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
When I try it, using three pages of dummy text with a character

style
applied to the first word on each page, I get the following

results:

Page 1: First word on page 2
Page 2: First word on page 2
Page 3: First word on page 3

I would actually expect page 1 to show the first word on page 1

as
well
because the \l switch causes Word to search *the page* from

bottom
to top,
picking up the *last* appearance of the style *on the page.*

This is in Word 2003 SP2.

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

"Stefan Blom" wrote in message
...
It did seem to work when I tested it (with the limitations

stated
in
my previous reply). This also seems consistent with the help

topic
titled "Field codes: StyleRef field" (see the "STYLEREF field
location" section at

http://office.microsoft.com/en-us/as...861931033.aspx).

--
Stefan Blom
Microsoft Word MVP


"Suzanne S. Barnhill" wrote in message
...
I don't believe a StyleRef field, even with the \l switch,

will
work
here
because it is based on text on the current page, not the

next
page.

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

"Stefan Blom" wrote in message
...
"Herman" wrote in message

oups.com...
Good day,

I work with MS Word documents on a daily basis that is

100+
pages.
The
formatting they require specify that the line numbering

must
be
on
the
right hand side of the page. Word can only place it on

the
left
side. I
have created a text box linked to the header with the

line
numbering
on
the right. Does anybody know of another way to do this?


I'm afraid there is no other method. If you find it

difficult
to
get
your custom line numbers to line up with text, consider

specifying
a
fixed amount of line spacing (FormatParagraph, Indents

and
Spacing
tab) for the text in the text box as well as for the text

in
the
main
body of the document.

The second problem is that the footer of every page must

be
the
first word of the next page. Is there an easy way to do

this?

Create a character style (with no formatting, based on

"underlying
properties") and apply it to the first word of each page.

Then
add
the
STYLEREF "characterstylename_here" \l (backslash followed

by
lowercase
"L") field to the footer.

Note that you cannot control which word is in fact the

first
on a
page, since pages are created dynamically by Word as you

add
and
remove text, so you'd better apply the style when document
formatting
is done (and you know what printer driver it will be used

with).
Alternatively, also add "Page break before" formatting
(FormatParagraph, Line and Page Breaks tab) to the

paragraph
containing the character-styled text.

--
Stefan Blom
Microsoft Word MVP
















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
Hebrew Suggestions Dannyza Microsoft Word Help 2 November 21st 05 06:12 AM
Page numbering in footers, Outside margin, Page Number + Number of Pages Eric G Page Layout 6 April 22nd 05 12:28 PM
page numbering in footers redbird Microsoft Word Help 1 April 22nd 05 06:14 AM
page numbering in footers in separate sections Doc Times Page Layout 3 March 29th 05 11:25 PM
Vertical line--leaving line and losing the box Chad Harris New Users 1 February 1st 05 04:50 AM


All times are GMT +1. The time now is 10:05 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"