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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in footer section

Status
Not open for further replies.

pmcdaniel

Programmer
Feb 9, 2007
127
US
I create a document from a VB application. I have many document variables and bookmarks.

In the footer I have {docvariable DocumentName} {PAGE}.

Both these Fields display the correct value... The DocumentName shows the name of the value I pass to it and the PAGE is updated correctly by WORD in the document after it runs/completes. However, when I do a Find for "ERROR!" I get "Error! No document variable supplied.-Error! No document variable supplied. {PAGE}" in the footer window of the document.

I've tried deleting every footer section and this still happens even though I have deleted everything inside the footer(s).

Can anyone help?
 
Thanks for the reply, mintjulep. The Alt-F9 revealed a Error! Bookmark not defined. in the TOC section of the document before it is generated. Alt-F9 only changed the {PAGE} to 22 in the footer window of the generated document.

I looked at another document which does not generate any errors and tried Alt-F9 and it showed Error! Bookmark not defined. for all the TOCs. When generated this document does not have any errors.

I'm still lost but continuing to look. Thanks for any help that can be provided.
 
Hi pmcdaniel,

I'm confused! Your post header refers to a footer error, as does most pf what you've written about the problem, EXCEPT that what you've described about the footer doesn't seem to indicate that there's and error there.
Both these Fields display the correct value
I can't see how your 'Find' relates to this and to 'Error! No document variable supplied.' Presumably, the 'Find' is in your vba code, but you don't say so, or when it's run. Now, in your latest post, you've introduced the TOC and 'Error! Bookmark not defined'.

Perhaps you could explain more clearly what the problem is - and include the relevant portions of the code you're using.

Cheers

[MS MVP - Word]
 
Sorry for the confusion. You know when you click on the View menu and choose Header and Footer and its pertinent bar appears? Something similar to this appears at the bottom of the document but it includes a window displaying the error messages. It looks very similar to the Comments pane. As matter of fact it's probably considered the Header and Footer pane. This only shows when I do a Find for the word ERROR!.

There is no VBA code - it's the actual document after it's been run and its fields have been filled.

I hope that helps and thanks again.
 
This only shows when I do a Find for the word ERROR!."

And you are doing this.........why?

Try again to explain clearly EXACTLY:

what you are doing
why you are doing it

I am confused as well.

faq219-2884

Gerry
My paintings and sculpture
 
Hopefully the included URL will help. There are no errors in the document that I can find but as you can see when I do the find the pane shows. There are about 31 pages to this document and when I toggle the {PAGE} field it shows 22. All the pages appear to show correctly.
 
 http://patmcdaniel.com/worderror/error.html
I will just say...no, that does not help.

Try answering the questions I asked in my post above.

What on earth are we to make of: "when I toggle the {PAGE} field it shows 22"????

With no background, it is a meaningless sentence.

Why are you toggling?
Do you get "22" on any, and all, pages you toggle on?

Frankly, if: " All the pages appear to show correctly." what exactly is your problem?

I will ask again, WHY are you even searching for "Error!"?

I may be able to offer a possible hint. You may have footers that are not visible, but have content. hard to say as you are decidely not forthcoming in useful information.

Did you ever change the footer? Did you have a DifferentOddEven, or DifferentFirstPage, and no longer do?

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top