Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi All,
Wondering if anyone could advice me on how to lock/unlink all field codes in the footers of my 1600page document. A different footer appears on the first page of each section of the document (about 140 in all). I can go to each one manually and hit CTRL+F11 to lock but there are just too many of them and getting to each one takes a lot of scrolling. Any advice please? Desperate for answers just now ![]() D |
#2
![]() |
|||
|
|||
![]()
Please use this code. But save your original document and test this code on a copy to see if it works. I have not tested this code, but reading it, it seems it will do the job. And this has been given by Macropod, who always gives great macros.
Please note that this will unlink all fields in the document, which means fields in the main document along with fields in footers, which means even page number fields. After running the code, if you add pages in between, the new pages will not show page numbers at all, and if you add a new page number field, it will be out of sync with rest of document. If you want to only unlink fields in the footer, then the code below has to be modified. To run this code, go to the code window (Alt+F11), paste this code in the blank window on the right. Place your cursor anywhere in the code and press F5. But be sure you are doing this on a copy of your original. First test it on a copy! Sub UnlinkAll() Dim oRng As Range, hLink As Hyperlink Application.ScreenUpdating = False With ActiveDocument ' Loop through Story Ranges and update. ' Note that this may trigger interactive fields (eg ASK and FILLIN). For Each oRng In .StoryRanges Do oRng.Fields.Unlink For Each hLink In oRng.Hyperlinks hLink.Delete Next Set oRng = oRng.NextStoryRange Loop Until oRng Is Nothing Next End With Application.ScreenUpdating = True End Sub This code was given by macropod at this site. You can go there to find out more https://groups.google.com/forum/?fro...nt/Y3z5psNb2YM Quote:
|
#3
![]() |
|||
|
|||
![]()
Hello Venky,
Thanks for the reply. ALT+F11 opens the codes field alright but I can't seem to be able to paste anything in the blank grey fields on the right as you suggested. Both CTRL+V and right clicking to paste do not seem to work for some reason. Any pointers? D Quote:
|
#4
![]() |
|||
|
|||
![]()
Hey Venky!
Its worked now! Figured out I had to click the document (project) on the left to activate the code field. Tried the code and its worked 'well good!' Thanks mate. D Quote:
|
#5
![]()
Posted to microsoft.public.word.formatting.longdocs
|
|||
|
|||
![]()
I'm glad you got it sorted. Out of curiosity, where is the actual code posted? I
don't seem to find it anywhere in this thread. -- Stefan Blom Microsoft Word MVP "domdagbui" wrote in message ... Hey Venky! Its worked now! Figured out I had to click the document (project) on the left to activate the code field. Tried the code and its worked 'well good!' Thanks mate. D domdagbui;492990 Wrote: Hello Venky, Thanks for the reply. ALT+F11 opens the codes field alright but I can't seem to be able to paste anything in the blank grey fields on the right as you suggested. Both CTRL+V and right clicking to paste do not seem to work for some reason. Any pointers? D -- domdagbui |
#6
![]() |
|||
|
|||
![]()
It is posted in wordbanter.com. Thread:
http://www.wordbanter.com/showthread.php?t=155399 Quote:
|
#7
![]() |
|||
|
|||
![]()
You have to select a project from the left hand window. In the left hand window you will find a Folder tree with Normal at top, followed by Project(Your document Name) below that, and so on. Since you may want this code only in this document and not all documents, click on the + sign next to the Project with your document name. You will find two folders under it. Click on the + sign next to the Microsoft Word Objects folder. It will reveal "This document" below it. Double-Click on "This Document". The right hand pane will get activated. Then paste the code in the right hand pane, and follow the rest of the instructions given in my previous post.
If you are using Word 2007 or later version, you will be prompted to save it as a Word macro-enabled document with the extension .docm. Accept that. Otherwise you will not be able to save your document. Quote:
|
#8
![]()
Posted to microsoft.public.word.formatting.longdocs
|
|||
|
|||
![]()
I suspect a macro must be used for this. But, since the page numbers are also
fields, you probably don't want to lock or unlink *all* field codes in the footers. (A locked or unlinked page field will show the same page number for all pages.) If you explained more in detail why you want to prevent the fields from updating, that would make it easier to suggest an approach... -- Stefan Blom Microsoft Word MVP "domdagbui" wrote in message ... Hi All, Wondering if anyone could advice me on how to lock/unlink all field codes in the footers of my 1600page document. A different footer appears on the first page of each section of the document (about 140 in all). I can go to each one manually and hit CTRL+F11 to lock but there are just too many of them and getting to each one takes a lot of scrolling. Any advice please? Desperate for answers just now ![]() D -- domdagbui |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ignore merge field codes when field doesn't exist | Mailmerge | |||
Locking images in Header/Footer | Microsoft Word Help | |||
Locking Pictures / Header / Footer | Page Layout | |||
Field codes: MergeField field RTF format problem | Mailmerge | |||
Saving word document with field results not field codes | Microsoft Word Help |