Home |
Search |
Today's Posts |
#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:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
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 |