picking up text from current page in footer

B

Brian Knittel

Hi,

I have a need to be able to embed a text phrase on various pages in my
document that will not be printed as part of the page, but which will be
picked up from the page and displayed in the footer. The goal here is to be
able to add content to the page footer on a page-by-page basis, which we'll
use to put a revision number on changed pages. (I'd like to define the page
footer once in the document and not have to insert section breaks so that
selected pages can have their own footer definition -- too hard to
maintain).

For example, I'd like to be able to embed the string "Rev 1" somewhere on
page 3, and have "Rev 1" appear in the footer of page 3 and only page 3.
The phrase "Rev 1" shouldn't appear in the body of page 3 -- just in the
footer.

I've been experimenting with the {STYLEREF} field. If I style the text "Rev
1" with a style named "RevTextStyle" created just for this purpose, I can
pick up the text in the footer with {STYLEREF "RevTextStyle"}. If the next
page doesn't need a marker, {STYLEREF} picks up the same text, so I have to
create an emtpy RevTextStyle paragraph on the next page to give {STYLEREF}
something to pick up on this and subsequent pages.

The problem is that if I use the Hidden font attribute to hide the
RevTextStyle paragraph in the body of the page, it's also hidden in the
footer, and even \* MERGEFORMAT doesn't seem to let me make the text
visible always. Any suggestions?

Or any ideas for other mechanisms to do this? This is a common requirement
for industrial/government/military type documents, so people have to have
encountered this before lots of times.

I've considered using a text box (Shape object) positioned to overlap the
footer. That could work too, but it's seems easy to mess up its positioning
accidentally. I'd appreciate any ideas anyone might have for handling this.

Thanks,
Brian
 
D

Doug Robbins - Word MVP

Check out the use of the StyleRef field.

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

Suzanne S. Barnhill

This is one huge drawback of the StyleRef field. Frustratingly, the Hidden
font attribute is the *only* direct font formatting it picks up. Given that
StyleRef is not going to work (and I suspect it would prove problematic even
if it did, for the reasons you describe), I think a text box is going to be
your best bet. Design your footer such that the text box won't cause
ructions, and anchor the text box to a paragraph that has been revised on
the given page .
 
R

Robert M. Franz (RMF)

Hello Brian

Brian Knittel wrote:
[..]
I've been experimenting with the {STYLEREF} field. If I style the text "Rev
1" with a style named "RevTextStyle" created just for this purpose, I can
pick up the text in the footer with {STYLEREF "RevTextStyle"}. If the next
page doesn't need a marker, {STYLEREF} picks up the same text, so I have to
create an emtpy RevTextStyle paragraph on the next page to give {STYLEREF}
something to pick up on this and subsequent pages.

The problem is that if I use the Hidden font attribute to hide the
RevTextStyle paragraph in the body of the page, it's also hidden in the
footer, and even \* MERGEFORMAT doesn't seem to let me make the text
visible always. Any suggestions?

to add to Suzanne's answer, instead of hiding the field you could also
set its font color to "white" and, say, its leading to "exactly 1 pt."
Alternatively, you could use a frame anchored somewhere on the page,
which displays a white text but is completely in the margin so it
doesn't disturb the flow of text.

Or any ideas for other mechanisms to do this? This is a common requirement
for industrial/government/military type documents, so people have to have
encountered this before lots of times.

The fundamental problem with such an approach in conjunction with a
modern text processor like Word is that (Word) is not at all
page-oriented. Thus, page-by-page revisions don't work really well not
matter what you do. In a sensible document, when you change something on
page 1, this change itself might result in altered pagination up to page
25 easily.

2cents
Robert
 
S

Suzanne S. Barnhill

An additional issue is that formatting something as white and one point (so
that it can't be seen even when Hidden text is displayed) is a recipe for
disaster even if you're the only person editing the text; I find it all too
easy to forget what I did in a document created a week ago, much less
several months or years.

Putting something in a frame makes it a bit more visible. If the frame is
anchored to the revised paragraph, then it should travel along pretty
reliably, but repagination is still an important consideration.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Robert M. Franz (RMF) said:
Hello Brian

Brian Knittel wrote:
[..]
I've been experimenting with the {STYLEREF} field. If I style the text
"Rev 1" with a style named "RevTextStyle" created just for this purpose,
I can pick up the text in the footer with {STYLEREF "RevTextStyle"}. If
the next page doesn't need a marker, {STYLEREF} picks up the same text,
so I have to create an emtpy RevTextStyle paragraph on the next page to
give {STYLEREF} something to pick up on this and subsequent pages.

The problem is that if I use the Hidden font attribute to hide the
RevTextStyle paragraph in the body of the page, it's also hidden in the
footer, and even \* MERGEFORMAT doesn't seem to let me make the text
visible always. Any suggestions?

to add to Suzanne's answer, instead of hiding the field you could also set
its font color to "white" and, say, its leading to "exactly 1 pt."
Alternatively, you could use a frame anchored somewhere on the page, which
displays a white text but is completely in the margin so it doesn't
disturb the flow of text.

Or any ideas for other mechanisms to do this? This is a common
requirement for industrial/government/military type documents, so people
have to have encountered this before lots of times.

The fundamental problem with such an approach in conjunction with a modern
text processor like Word is that (Word) is not at all page-oriented. Thus,
page-by-page revisions don't work really well not matter what you do. In a
sensible document, when you change something on page 1, this change itself
might result in altered pagination up to page 25 easily.

2cents
Robert
--
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/
 
B

Brian Knittel

to add to Suzanne's answer, instead of hiding the field you could also set
its font color to "white" and, say, its leading to "exactly 1 pt." ...
The fundamental problem with such an approach in conjunction with a modern
text processor like Word is that (Word) is not at all page-oriented. Thus,
page-by-page revisions don't work really well not matter what you do. In a
sensible document, when you change something on page 1, this change itself
might result in altered pagination up to page 25 easily.

There is a vast segment of the technical document space that is page
controlled; that is, pagination is not allowed to change, due to
governmental regulations or just corporate policy. If editing causes a new
page break, you can't just renumber the succeeding pages. You have to insert
an outliner page. For example, if the content of page 11 spills to a new
page, you can't renumber page 12 to 13, 13 to 14 and so on, you have to
insert a page 11a. Word's making page flow invisible to its object model
doesn't make automating the job any easier! There are hundreds of millions
of pages of documents out there that require this sort of control, and the
individual revision marking that I've been discussing. These, plus more
significant issues like the instability of outline numbering mean Word is a
poor choice for maintaining technical documents. Yet, corporations and
agencies still decide to use it, so we're stuck with it.

Using 1 point white text could work technically, but the purpose of all this
is to assist in easy and accurate maintenance of the document. Short leading
would make the embedded marker text nearly impossible to find or edit. I
guess I could write macros to enlarge or shrink the text based on stylename,
but the idea still makes me uncomfortable. Hidden text would have been such
a good solution because you can enable and disable its display quite easily.
And in fact I'd set up the style for these marker paragraphs as having a
colored background shade and a thick border, so its presence on the page was
unmistakable. But, unfortunately, as Susan noted, there appears to be no way
to prevent {STYLEREF} from carrying the hidden attribute along with the
text, so the text can't be invisible in the body but visible in the footer.

Unless there's a field that extracts just the text from its argument,
stripping all formatting? Then I could nest the STYLEREF inside that.

Anyway -- I think that a text box overlaying the footer may be the only
option. STYLEREF is not usable, and I investigated using SET, but you can't
multiply define bookmarks, so that won't work either. I just don't see any
other options. I'll discuss with the client and see where it goes.

Thanks for your input
Brian
 
R

Robert M. Franz (RMF)

Hello Brian

Brian said:
There is a vast segment of the technical document space that is page
controlled; that is, pagination is not allowed to change, due to
governmental regulations or just corporate policy. If editing causes a new
page break, you can't just renumber the succeeding pages. You have to insert
an outliner page. For example, if the content of page 11 spills to a new
page, you can't renumber page 12 to 13, 13 to 14 and so on, you have to
insert a page 11a. Word's making page flow invisible to its object model
doesn't make automating the job any easier! There are hundreds of millions
of pages of documents out there that require this sort of control, and the
individual revision marking that I've been discussing.

I believe you that there is such type of documentation out there. IMHO,
I think it's archaic and such a "document model" should hit the dust
rather sooner than later, because it really is a model tied too much in
the physical, printed model.

When the documentation world was ruled by typewriters, this model made a
lot of sense. Paper was relatively expensive, and to correct one tiny
flaw somewhere you only changed that one page, had it retyped, and
swapped against its predecessor. But nowadays, many forms of
documentation have nothing whatsoever to do with pages. They might end
up in small HTML chunks, or on your PDA, or any other electronic gadget.
"Page" doesn't really have a meaning then.

Also, for "tracking" edits while a document is still in production,
there are new tools to go about that. By no means is Word's Track
Changes feature all one could wish for, but in a controlled environment,
there's not much wrong with it conceptually.

These, plus more
significant issues like the instability of outline numbering mean Word is a
poor choice for maintaining technical documents. Yet, corporations and
agencies still decide to use it, so we're stuck with it.

I guess Wordies have to fight with numbering issues now and then, yes.
:) Depending on the needs, many field-based numbering schemes are more
solid and are certainly in use to this day. SEQ anyone?

Using 1 point white text could work technically, but the purpose of all this
is to assist in easy and accurate maintenance of the document. Short leading
would make the embedded marker text nearly impossible to find or edit. I
guess I could write macros to enlarge or shrink the text based on stylename,
but the idea still makes me uncomfortable. Hidden text would have been such
a good solution because you can enable and disable its display quite easily.
And in fact I'd set up the style for these marker paragraphs as having a
colored background shade and a thick border, so its presence on the page was
unmistakable. But, unfortunately, as Susan noted, there appears to be no way
to prevent {STYLEREF} from carrying the hidden attribute along with the
text, so the text can't be invisible in the body but visible in the footer.

Well, since you really have a page-oriented approach, I think it's
easier by _a lot_ if you work with single-page sections. You unlink your
headers and footers and never need bother with STYLEREF. After all,
fields should make our life easier.

2cents
Robert
 
B

Brian Knittel

Hi all,

Thanks for the interesting discussion. I agree the the page model may be
rooted in antiquity (as is the custom of making text terminal displays and
command prompt windows 80 characters wide, which comes from the punched
card). But, for regulatory, control and maintenance reasons, some unit has
to be selected as the unit for approval and distribution, and the page is a
reasonable sized chunk. But more importantly, manuals are still printed on
paper and you have to have a way of marking and distributing updates to
printed manuals. So the page is an important and persistent concept.

(And regardless of its value or the length of its teeth, there's no reason
that Word has to hide it from us -- there could easily be a method to give
us a range object scoped to a page. There just isn't.).

I have clients that are moving to page-less models, but truth be told, it's
causing them more headaches than it's solving

But -- back to the original topic, I solved the problem using the SEQ field:

{SEQ RevLevel \r nnn}

in a hidden paragraph on any page whose revision level is different than the
previous page's, and

{IF {SEQ RevLevel} = 0 "" "Revision {SEQ RevLevel}"} in the footer.

Bingo! They just need a pushbutton+macro to let them insert and edit these
and they're good to go.

Brian
 

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