![]() |
|
#2
|
||||
|
||||
|
You could use a macro like the following to delete all LINK fields whose result is effectively nothing:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
For i = Fields.Count To 1 Step -1
With .Fields(i)
If .Type = wdFieldLink Then
If Trim(.Result) = "" Then .Delete
End If
End With
Next
End With
Application.ScreenUpdating = True
End Sub
For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Excel-find cells that contain all upper cas
|
Mamadukes2007 | Excel | 2 | 02-06-2016 02:17 AM |
| Find and list Blank pages in Word document. | ndandge | Word VBA | 4 | 11-29-2015 09:15 PM |
locking word table cells while auto-updating fields
|
fingermouse | Word | 6 | 01-14-2015 06:22 AM |
How to make Excel stop treating blank cells as zero
|
Chuck_Ds | Excel | 10 | 01-13-2015 08:33 AM |
Excel VBA - Mandatory cells cannot stay blank?
|
hussnainh8 | Excel | 9 | 12-28-2014 09:40 AM |