Field bracket: one half missing and I can't delete the other brack

L

LizW

I have a document with a footer that has a right bracket that appears to have
once been a part of a set of field brackets. The other one is not there and
we can not, no matter what we try, delete it.

We've tried deleting, cutting, clearing formatting, inserting another blank
field, editing fields, everything with the f9 key and alt, control etc.

Any suggestions would be greatly appreciated. Thanks.
 
C

Chuck

When this happens to us the only thing that seems to work is to clean out the
corrupt footers and start again.
1. Go to the last footer in the document,
2. make sure different first page is turned off for that section
3. select Same as Previous
4. go to the previous section
5. repeat steps 2-4 until you're at the beginning of the document

The rogue field code should be gone. Of course this only works if there's
more than one section or if only one section the first page footer is set to
different. We haven't seen this problem in a single-section document however.

The following code should do this for you, however I haven't tested it on a
document that has the kind of corrupt footers you're talking about because we
don't have one currently. After running the macro you'll need to rebuild
your footers (page numbers etc). Use at your own risk. Don't use on a live
document, make a copy first then test it out. Let me know how it goes.

Sub KillRogueFieldFragment()

Dim lngSec As Long
Dim ftrFooter As HeaderFooter

With ActiveDocument

For lngSec = .Sections.Count To 1 Step -1
.PageSetup.DifferentFirstPageHeaderFooter = False
For Each ftrFooter In .Sections(lngSec).Footers
ftrFooter.LinkToPrevious = True
Next ftrFooter
Next lngSec

End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top