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

Header reverts back to mispelled word after Print Preview

Status
Not open for further replies.

Jtorres13

Technical User
Nov 11, 2006
162
US
Hello. I have this weird problem. I have a macro that opens a letter template. This letter template pops up field boxes to fill in the name, address, salutation, etc to build the letter. when theletter is built and I try to change the header because I mispelled it it looks OK and it even saves the change. until I do Print Preview. If I Preview it, it changes the header back to the mispelled word. AFTER SAVING IT!!

Weird. I looked in the macro but I can't see anything out of the ordinary, not even mentions to the header. Any ideas on where to look for more information? this is word 2003 in Windows XP
 
Would you check to if you have fields that do not show in Page Layout view? ALT/F9 should bring up all the fields you have.

Member- AAAA Association Against Acronym Abusers
 
I made a breakthrough. the template uses bookmarks. This is what the fields I fill in at the begining turn into The Name bookmark is used in the header. The problem I see is that when I change the name field, it doesn't update the bookmark and thus, it doesn't update the header. I have to manually recreate the bookmark by highlighting the field and then Insert | Bookmark | Add. This recreates the bookmark. Next, I need to go to the header and Update the Field with the right click menu.

I noticed the Update Field menu command but it wasn't working until I recreated the Bookmark.

Can we call it a bug? Or is there a way to permanently fix it in the macro, even if it requires some coding. I don' tknow much about VBA.
 
We would have to see your code. Obviously the template is taking the value of the bookmark. Changing the bookmark text may notbe updating the bookmark itself, as you say you have recreate the bookmark.

There is simple code that will always replace the bookmark text accurately.

Gerry
My paintings and sculpture
 
The bug is with the speller then. <g> This is a problem with using automation: it needs to be designed carefully to avoid such anomalies occurring.


Regards: tf1
 
I understand what you're saying but the only code existing is to create the document and that's it. There are no extra procedures or event driven subs or reoutines reacting to the Print Preview or Print events. That's why I'm inclined to say it's a bug. I'm going to create a document with no macros that has a bookmark and uses it in the header. I'm then going to update the bookmar and see if it updates the header. I haven't had time yet. But I'm listing it here in case someone wants to paly with it and let us know if it works or not.

I'll let you know how it goes. Thanks for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top