#1
|
|||
|
|||
Find & Replace in Header/Footer
How would I do the find/replace for all headers and footers? Especially as even/odd pages and the different sections (chapters) have different information. My goal is replacing the manually typed copyright date and owner with crossreferences to bookmarks containing this information.
Also, when I copy a crossreference to the bookmark, and paste in Find/Replace it appears to convert it to text, and it's certainly text after it's replaced (in the footer). (Too bad the find and replace fields don't have a right-click Insert Crossreference capability.) |
#2
|
||||
|
||||
An ordinary find and replace will go through headers and footers as well, if that helps.
If you want to search for cross-reference fields, you have to display field codes first (Alt+F9). In the Find and Replace dialog box (Ctrl+H), use ^d REF for "Find what."
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#3
|
|||
|
|||
By ordinary find/replace do you mean from the main body of the document, not within a header or footer? I was in the odd or even page footer and find wouldn't proceed to the next section's footer.
I'm trying to replace ordinary text with a cross-reference, and pasting a copied cross-reference with or without field codes displayed pastes the result of the field code into the replace box and appears to no longer be a cross-reference, just straight text. When pasted into the document it certainly isn't a cross-reference. I'll have to try copying to the clipboard and pasting the clipboard (^c) to see if that works. (I think when I last tried it didn't work for x-refs.) Putting ^d REF nameofbookmark in the replace box gives an error (^d is not a valid special character in the Replace With box). (I know you said to do it in the Find box, but I want to replace text with a cross-ref.) When using ^d REF in the Find box, should wildcards be on or off? I think off, but I'm working on Replace, not Find, so I didn't try. I guess I should have specified in my original post that the Replace box should have a right-click Insert Cross-Reference option. (I guess Find could use it too even though you presented a way.) Last edited by PReinie; 01-21-2014 at 09:48 AM. Reason: Add more info for clarification. |
#4
|
|||
|
|||
Find & Replace Header & Footer in multiple files.
Hi,
I have 1000 odd word files in which I want to replace Header & Footer text, is there an automate way to achieve this. is there any Microsoft or any third party tool available to address this ask, Thanks & Regards Amodiamm |
#5
|
||||
|
||||
From the main body of the document a search should continue into headers and footers, yes.
As you have seen, you can't use ^d REF in the "Replace with" box. If you want to replace something with a particular field, just copy the field to the clipboard and specify ^c in the "Replace with" box. No, when using ^d or ^c you shouldn't select the "Use wildcards" option.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#6
|
|||
|
|||
Ahhh, the way to do it.
Stefan, that helped.
I didn't expect the headers and footers to be found/replaced after the entire main body was done, but that's what happened. (I thought at the end of the page of the main body that page's footer would be replaced. Note that if I started in the middle of the main body Word likely would have wrapped to the main-body-top before working on the headers and footers. (Assuming All was selected in the Search: box and not Up or Down.) It appears that when you (any reader of this) copy the cross-reference you should do it when the field codes are NOT displayed... at least, that's the only way I got it to work. You might also want to be careful that you select the entire source cross-ref and not just copy it to the clipboard when it becomes highlighted (as a cross-ref). Maybe turn on the delineation marks that show the beginning and end of a cross-ref. Then ^c (or select from clipboard in the Special drop-down) in the Replace with box and Find did the trick. Note too that ^c is typing a Shift-6 then a 'c', not using CTRL+C. (I didn't try CTRL+C.) |
#7
|
||||
|
||||
Quote:
Please don't try to hijack threads containing other people's discussions. In any event, this question has been responded to in your separate thread (https://www.msofficeforums.com/word/...000-files.html), which brings me to another issue: Please don't post the same question in multiple threads...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
header footer | Pierre-Hugues | Word VBA | 1 | 08-30-2013 06:06 AM |
Footer Find & Replace Operation? | binar | Word | 1 | 02-05-2013 10:39 PM |
Bad view when using Find and Find & Replace - Word places found string on top line | paulkaye | Word | 4 | 12-06-2011 11:05 PM |
header & footer | avi_sai | Word | 1 | 12-03-2011 10:52 AM |
Help with find and replace or query and replace | shabbaranks | Excel | 4 | 03-19-2011 08:38 AM |