Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Field not updating in footer
I have a document with a complicated set of headers and footers, intended to
give a blank footer on the first page, then the document completed date on the left of the footer and the page number on the right if odd numbered, and vice versa if even numbered. The problem is that the date completed does not update consistently after I change it in Document Properties. It updates OK when it is on the right (even page) but not on the left (odd page). I have tried doing the updating by using the macro suggested at http://www.gmayor.com/installing_macro.htm but the problem persists. In more detail: First section has blank first footer, and a main footer that does the page number/completion date, using IF and MOD{PAGE} as suggested by Jay Freedman (answer posted 6/21/2005). Second section has a first footer which happens to be the same as the main footer of the first section (although it does not have €śsame as previous€ť ticked), and main footer of second section is also the same and does have €śsame as previous€ť ticked. Both first and main footers of all the other sections have €śsame as previous€ť ticked. Incidentally, I also have first and main headers defined for each section. Sorry this sounds so complicated, any help please? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Field not updating in footer
A print preview should update your headers and footers and their fields.
For a macro solution, it is possible that you'll have to cycle through the sections as well as the storyranges. Not sure. You might try the following macro instead: Private Sub FieldsUpdateAllStory() ' All Story Field Updater ' Written by Charles Kyle Kenyon 9 December 2004 ' repaired with help from Jezebel 28 November 2005 ' Note, if used in protected form this will reset ' formfields to their defaults Dim oStory As Range On Error Resume Next For Each oStory In ActiveDocument.StoryRanges Do oStory.Fields.Update Set oStory = oStory.NextStoryRange Loop Until oStory Is Nothing Next End Sub -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "BarbaraF" wrote in message ... I have a document with a complicated set of headers and footers, intended to give a blank footer on the first page, then the document completed date on the left of the footer and the page number on the right if odd numbered, and vice versa if even numbered. The problem is that the date completed does not update consistently after I change it in Document Properties. It updates OK when it is on the right (even page) but not on the left (odd page). I have tried doing the updating by using the macro suggested at http://www.gmayor.com/installing_macro.htm but the problem persists. In more detail: First section has blank first footer, and a main footer that does the page number/completion date, using IF and MOD{PAGE} as suggested by Jay Freedman (answer posted 6/21/2005). Second section has a first footer which happens to be the same as the main footer of the first section (although it does not have "same as previous" ticked), and main footer of second section is also the same and does have "same as previous" ticked. Both first and main footers of all the other sections have "same as previous" ticked. Incidentally, I also have first and main headers defined for each section. Sorry this sounds so complicated, any help please? |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Field not updating in footer
Thank you for those suggestions, but unfortunately they do not solve the
problem. I have found that the behaviour is very inconsistent. If I change the document property, then use print preview it will probably update about half of the footers (but not always the same ones), and if I then use print preview again, some more will update, and usually after about 3 or 4 goes of print preview it has managed to do them all. I find this totally baffling. I have had a colleague look at it too, and he gets a similar result (he has Word 2002, and I have Word 2000). I have several documents created from the same template, and they all suffer the same. I did wonder if it was actually something to do with UK/US date formats, as there is some conflict when setting the property (I have UK settings), but this does not happen on the Word2002 version so it seems unlikely this is the root of the problem in the footers. My footer looks like this: {IF { =MOD({PAGE},2)} =0 "{PAGE}" "{DOCPROPERTY "Date completed" \@ "d-MMM-yy"}"} {SUBJECT} {IF{ =MOD({PAGE},2} =0 "{DOCPROPERTY "Date completed" \@ "d-MMM-yy"}" "{PAGE}"} I also use the same document property once in the text, which does not give any problem (although I note it does not update on print preview - I don't know whether it should or not?) "Charles Kenyon" wrote: A print preview should update your headers and footers and their fields. For a macro solution, it is possible that you'll have to cycle through the sections as well as the storyranges. Not sure. You might try the following macro instead: Private Sub FieldsUpdateAllStory() ' All Story Field Updater ' Written by Charles Kyle Kenyon 9 December 2004 ' repaired with help from Jezebel 28 November 2005 ' Note, if used in protected form this will reset ' formfields to their defaults Dim oStory As Range On Error Resume Next For Each oStory In ActiveDocument.StoryRanges Do oStory.Fields.Update Set oStory = oStory.NextStoryRange Loop Until oStory Is Nothing Next End Sub -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "BarbaraF" wrote in message ... I have a document with a complicated set of headers and footers, intended to give a blank footer on the first page, then the document completed date on the left of the footer and the page number on the right if odd numbered, and vice versa if even numbered. The problem is that the date completed does not update consistently after I change it in Document Properties. It updates OK when it is on the right (even page) but not on the left (odd page). I have tried doing the updating by using the macro suggested at http://www.gmayor.com/installing_macro.htm but the problem persists. In more detail: First section has blank first footer, and a main footer that does the page number/completion date, using IF and MOD{PAGE} as suggested by Jay Freedman (answer posted 6/21/2005). Second section has a first footer which happens to be the same as the main footer of the first section (although it does not have "same as previous" ticked), and main footer of second section is also the same and does have "same as previous" ticked. Both first and main footers of all the other sections have "same as previous" ticked. Incidentally, I also have first and main headers defined for each section. Sorry this sounds so complicated, any help please? |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Field not updating in footer
I do have the update fields box checked under Options Print (I don't have
any ASK or FillIn Fields). I did try your macro - it didn't seem to give different outcome from Print Preview or the macro by G Mayor - that is to say that the field in the footers updated on some pages but not all, and which pages varied from one attempt to another. Barbara "Charles Kenyon" wrote: The DocProperty field will not update on print preview unless you have the box checked to update fields on printing. If you use ASK or FillIn fields, you do _not_ want to do this. Did you try my macro? -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "BarbaraF" wrote in message ... Thank you for those suggestions, but unfortunately they do not solve the problem. I have found that the behaviour is very inconsistent. If I change the document property, then use print preview it will probably update about half of the footers (but not always the same ones), and if I then use preview again, some more will update, and usually after about 3 or 4 goes of print preview it has managed to do them all. I find this totally baffling. I have had a colleague look at it too, and he gets a similar result (he has Word 2002, and I have Word 2000). I have several documents created from the same template, and they all suffer the same. I did wonder if it was actually something to do with UK/US date formats, as there is some conflict when setting the property (I have UK settings), but this does not happen on the Word2002 version so it seems unlikely this is the root of the problem in the footers. My footer looks like this: {IF { =MOD({PAGE},2)} =0 "{PAGE}" "{DOCPROPERTY "Date completed" \@ "d-MMM-yy"}"} {SUBJECT} {IF{ =MOD({PAGE},2} =0 "{DOCPROPERTY "Date completed" \@ "d-MMM-yy"}" "{PAGE}"} I also use the same document property once in the text, which does not give any problem (although I note it does not update on print preview - I don't know whether it should or not?) "Charles Kenyon" wrote: A print preview should update your headers and footers and their fields. For a macro solution, it is possible that you'll have to cycle through the sections as well as the storyranges. Not sure. You might try the following macro instead: Private Sub FieldsUpdateAllStory() ' All Story Field Updater ' Written by Charles Kyle Kenyon 9 December 2004 ' repaired with help from Jezebel 28 November 2005 ' Note, if used in protected form this will reset ' formfields to their defaults Dim oStory As Range On Error Resume Next For Each oStory In ActiveDocument.StoryRanges Do oStory.Fields.Update Set oStory = oStory.NextStoryRange Loop Until oStory Is Nothing Next End Sub -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "BarbaraF" wrote in message ... I have a document with a complicated set of headers and footers, intended to give a blank footer on the first page, then the document completed date on the left of the footer and the page number on the right if odd numbered, and vice versa if even numbered. The problem is that the date completed does not update consistently after I change it in Document Properties. It updates OK when it is on the right (even page) but not on the left (odd page). I have tried doing the updating by using the macro suggested at http://www.gmayor.com/installing_macro.htm but the problem persists. In more detail: First section has blank first footer, and a main footer that does the page number/completion date, using IF and MOD{PAGE} as suggested by Jay Freedman (answer posted 6/21/2005). Second section has a first footer which happens to be the same as the main footer of the first section (although it does not have "same as previous" ticked), and main footer of second section is also the same and does have "same as previous" ticked. Both first and main footers of all the other sections have "same as previous" ticked. Incidentally, I also have first and main headers defined for each section. Sorry this sounds so complicated, any help please? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fields inside footer -- Last record showing field instead of data | Mailmerge | |||
MS WORD - Linking a field in footer to a field in the document - Help | Microsoft Word Help | |||
MS WORD - Linking a field in footer to a field in the document - Help | Microsoft Word Help | |||
Updating a date field | Microsoft Word Help | |||
Text Form Field Ref in Footer Won't Update on Screen | Microsoft Word Help |