Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WORD 2K Header problem

Status
Not open for further replies.

Jomama46

Technical User
Apr 15, 2003
325
US
I have a long document on which I have formatted the header and footer as follows: PPL100107 Page 90 of 90
The problems is the header actually looks like this:
PPL100107 Page 90 of 90 f

Note the "f". I can't get rid of that f. I can highlite it, then press delete and nothing happens, I can highlite the whole line and delete it and the f remains. I cant backspace over it. It shows in printing also. Its only on the header, not the footer.
Any help?



pc.gif

Jomama
 
Where & how have you "formatted" the header?
Using a label, textbox, bound, unbound etc.?

Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes.
 
I double clicked on the header space and typed PPL101007 Page (then I clicked on View>Header footer and choose>Page #; then typed "of" (then I clicked on # of pages in the header footer dialog box. Then clicked on the Center icon to center it.
Then I did the same thing to the footer.
Somewhere along the line, the f showed up in the header.


pc.gif

Jomama
 
Try a fresh report. From the toolbox, choose the text box tool & draw it in the header.
For its ControSource property, enter ="PPL101007 Page " & [page] & " of " & [pages].
Should do the trick...

It's always darkest before dawn. So if you're going to steal your
neighbor's newspaper, that's the time to do it.
 
Part of this does not make sense.
I double clicked on the header space and typed PPL101007 Page (then I clicked on View>Header footer
Let's see:

1. double click the header space
2. type PPL101007
3. click View > Header footer

If you actually did that, then #3 would bring you OUT of header view, and back into the document. So...you likely did NOT do that.

You can try using a drawing textbox...but I wouldn't. Personal. I hate the things, and I see no reason to use one for the situation you describe.

What happens if you go into the header and select everything, a Ctl-A? Try doing that and delete it. Is there still an "f"? What happens when you ar ein header View and you do an Alt-F9? Do any field codes show?

"f" does not appear on its own, or magically. Something put it there. Text Page x of y is very common to have, and should not be a problem.

I don't know if you would like a VBA solution, but:
Code:
Sub PutInHeader()
Dim r As Range
Set r = ActiveDocument.Sections(1) _
        .Headers(wdHeaderFooterPrimary).Range
With r
    .Text = "PPL101107 "
    .Collapse Direction:=wdCollapseEnd
    ActiveDocument.AttachedTemplate _
         .AutoTextEntries("Page X of Y").Insert _
         Where:=r, RichText:=True
    .ParagraphFormat.Alignment = wdAlignParagraphCenter
End With
Set r = Nothing
End Sub
removes everything (including whatever that darn "f" is) pre-existing in Header Primary, and replaces it with (centered):

PPL101107 Page x Of y

It will remove everything: fields, graphics, textboxes....whatever, and replace it with (centered):

PPL101107 Page x Of y

faq219-2884

Gerry
My paintings and sculpture
 
Genomon- I did that and pasted the entry you posted into the text box in the header, the result is ="PPL101007 Page " & [page] & " of " & [pages]f


Fumei- you're right that #3 shoulnt have been in there it is just an alternate way to get into the header.
I dont know how to activate the code you posted, but if I select everything with Ctr-A and press delete or backspace or space, everything is gone except the f -ing f. Alt+f9 does not show any codes.

pc.gif

Jomama
 
Whatever solution you decide on, I think you should start completely fresh with a blank report. The f'n f has to be coming from somewhere. Can you highlight f? If so, look at its property sheet and find out what the f f is.....

It's always darkest before dawn. So if you're going to steal your
neighbor's newspaper, that's the time to do it.
 
Fresh Report. I like it but heres the thing.Its 92 pages of Double column text and prices. I can copy it and paste to a new sheet but the headers come with it. And I cant completely delete the header. (the f ing f hangs in there)
I can highlight it but there is no property box. If I try to backspace over it, the cursor just disapears. If I place the cursor to the right of the f, it is 2 spaces to the right and the left arrow will not move the cursor to the left. If I place the cursor to the right of the f, it will be right next to the f but the right arrow will not move over the f.
Maybe if I copy and paste page by page....

pc.gif

Jomama
 
OK then CHEAT! Draw a label or text box over the f'n' f, do not give it a ControSource/Caption, and set the BackStyle property to "solid". If you can't kill it, bury it!

[deadhorse]

Good luck!

It's always darkest before dawn. So if you're going to steal your
neighbor's newspaper, that's the time to do it.
 
OK, here's my solution. I like the starting over idea but instead of copying and pasting the whole thing(ctrl+A), I just highlighted the text and pasted it into a new formatted page with headers and footers. That worked!
Thanks for all the ideas!

pc.gif

Jomama
 
Yaaay! Farepoor and badspeed to F!
We'll be home in time for a cold one before dinner.
Enjoy the weekend!

[thumbsup2]

It's always darkest before dawn. So if you're going to steal your
neighbor's newspaper, that's the time to do it.
 
Out of some curious perversity, if it is possible to get a copy of the document with the f-ing f, I would like to see it. Remove any data/information that is inappropriate for me to see. If this is possible, send me a copy (preferably ZIP'd) to:

myhandle at telus dot net

faq219-2884

Gerry
My paintings and sculpture
 
Oh my....how utterly fascinating! Thanks. I will enjoy chewing on this f-ing f. How bizarre.

I have never seen such behaviour.

You can put the cursor AFTER the final paragraph mark in the header. If you do, the button to toggle between header/footer gets focus all by itself. Move the cursor in front of the paragraph mark, the toggle button loses focus.

Interesting.

It will NOT accept style changes.

The ASCII character of it is 102, which is indeed "f". However, I tried a wee test.
Code:
MsgBox Len(Selection.Text) & vbTab & Asc(Selection.Text) & _
    vbCrLf & vbCrLf & Asc(Right(Selection.Text, 1))

This gives:

the length of the Selection
the ASCII character of the first character of the Selection
the ASCII character of the last character of the Selection

OK?

If you go into the document itself and put "f" (by itself) on a new paragraph, you get:

2 102
13

Which is correct. There are two characters (Len), the "f" (102), and 13 (the paragraph mark).

BUT......

If you go into the header and select everything and run the code, you get:

1 102
102

There is NO paragraph mark!!!!

This is why it is possible to put the cursor AFTER the (apparently visible) final paragraph mark. It looks like a paragraph mark, but...it is not.

I have been using Word since 1.0 for DOS. I have never seen anything like this.

Finally, I tried to delete the entire range of the header with:
Code:
Dim r As Range
Set r = ActiveDocument.Sections(1) _
        .Headers(wdHeaderFooterPrimary).Range
        r.Delete

I get the following error message.

"There are too many spelling and grammatical errors in PPL101107.doc to continue displaying them. To check the spelling and grammar in this document choose Spelling and Grammar from the Tools menu."

Say what? Who asked you check spelling??????

Now....wait for it.....

when I press OK on the error message, the range IS deleted along with the "f".......

after a three second pause - and I can clearly see there is NO "f" in the header - the "f' REAPPEARS!!!

What the...ummmm...f??

If I run the code a second time, there is no error message, and the "f" sits daintily, undisturbed. Which is more than I can say about myself.

There are no fields, or at least no fields appear when you toggle for them.

I have no...ummmm....f-ing idea.

I am flabergasted and flummoxed.


faq219-2884

Gerry
My paintings and sculpture
 





Must be the...

ph-ing, phickle, phinger of phate.

Sorry, it's PHriday, and I' m about the phlee the ophphice, phinally! ;-)

Skip,

[glasses] When a group touring the Crest Toothpaste factory got caught in a large cooler, headlines read...
Tooth Company Freeze a Crowd! and
Many are Cold, but Few are Frozen![tongue]
 
OK, so tell me more. Did this just suddenly happen? Was the file OK (no "f") and it just appeared? Details if possible.

BTW: ummmmm, you should learn to use Styles. This document is a mess.

Why "f"???????????????????????????

If you put the cursor to the right of the paragraph mark - which you should NOT be able to do - the toggle header/footer button appears to have focus, AND the "current" Style switches from Page Number, to Footer.

Hmmmmm.

If you actually click the toggle button....the cursor jumps back to BEFORE the "paragraph mark" and does not, in fact toggle.

Somehow, the view of the Header appears to be showing part of the view of the Footer. At the top of the Footer view is "Footer".

So....I deleted all the other pages, since they are irrelevant to this header issue. So now it is one page. The "f" is still in the header.

I switch to the footer view...seems fine. I switch to header View. The "f" is still there. I switch back to Footer, and change the Page Setup, to Different First Page.

I am in Footer View. The text above the footer, the label (so to speak) changes from:

Footer

to

First Page Footer

Guess what? There is NO "f" in the header. The text, the label, has changed from "Header", to "First Page Header".

I change DifferentFirstPage off....

Yup. The "label" above the Footer is "Footer"...and the "f" returns to the header.

How this is possible is beyond me. The header is - somehow - picking up the first letter of the footer label AND the footer style.

Further, it is ONLY doing it with wdHeaderFooterPrimary.

If you turn Different First Page ON, there is NO "f" in that header. But all the other pages DO have the "f".

Narrowing it down more....

Turn Different odd and even ON. There is NO "f" in the header for First Page, NO "f" in the header for Even Pages...but there IS an "f" in the header for Primary - which handles odd pages.

It is ONLY doing this in wdHeaderFooterPrimary.

But again, how...or why...I have no idea.

So far.

faq219-2884

Gerry
My paintings and sculpture
 
Man oh man, this is very very very very weird.

OK. I made the Section both DifferentFirstPage, and DifferentOddEven, plus made three pages. So there are three different header content.

The odd pages - technically used by Primary - has the f-ing f. ONLY it has the "f".

OK. I wriggle/scroll the document so that when I am in Header View, on Primary (with the "f"), it is at the top of document window. So right above it are the toolbars (I don't have the rulers displayed).

I move the cursor to the right of "f" - ie, to the right of the "paragraph mark" after "f"...which I should not be able to do.

Guess what? Although I am in the Header View, it MOVES the Selection, the cursor location, into the Footer of the previous Section....and scrolls the document up so I can see it! In the Footer!

In fact, now with both the Header of the odd page (Primary, page #3), and the Footer of the even page (EvenPage, page #2) both visible.....

if I click before the "f", or between the "f" and the "paragraph mark", the cursor stays in the header view (odd page, Primary), but if I click AFTER the "paragraph mark" but in the Header view....the cursor jumps by itself into the Footer View of the previous page.

So it is confirmed, IMO, somehow, the Header view of Primary leaks into the Footer View.

Further, it is part of creation of Primary. The "f" shows up in ALL Primary. No matter how many Sections. ALL wdHeaderFooterPrimary, in ALL sections, has this "leakage".

Bottom line? The file is corrupt. How and why is beyond my skills or knowledge. I have never seen anything like it. If you made a clean new copy without this weirdness, great. At least it is specific to only this file. As for this one...axe it. It is dead and untrustworthy.

I will keep my copy as a curiosity, but I have thrown everything I can at it and can only say that there is something so deeply corrupted in it that it is hopeless. It has made me wonder how those "labels" above header and footer views are created. However, AFAIK, that is deep within the bowels of Word and are not exposed to us mortals.

faq219-2884

Gerry
My paintings and sculpture
 
So....I deleted all the other pages, since they are irrelevant to this header issue. So now it is one page. The "f" is still in the header.
Funy you should mention that, in preparing to zip a file to send to you, I thought I would delete most of the pages as only 1 or 2 are necessary to present the problem. so I deleted all but the first few and the f ing f was gone.
sure says I, now you disappear. ????
As for the rest of the detailed explanation (or lack thereof) you gave, it made my head spin and me and Johnny Walker had to talk about all night long.
I have used this format for about 4 years, and every year when I update it instead of making a whole new book I just delete the data in the old PPL and paste the new data in and correct the tabs and orphans, etc. Instead of pluging in the margins and column data to make it look like the old old one. This is the first one that has the f. I think it may have been left over from "page --- of ----."
The only other thing is that I used to use Word97 but the last 2 or 3 have been composed with Word2000.
I suppose you're right about using styles but I don't know what that is about.
Now get back on your meds and have a nice day.

pc.gif

Jomama
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top