View Single Post
 
Old 07-30-2012, 09:32 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Unfortunately, there's nothing in the field code you can edit. If you select one of the fields and press Shift-F9, you'll be able to see the field code - and it won't have 'Figure', 'Table' or any other indicator of the caption type. If you were to use Find/Replace on the field results, that would be ineffective, as the fields will revert to their original display as soon as anything causes the cross-references to update. The only way around that - and it could be useful when the document is at it's 'Final' stage, would be to edit the display via a macro, then either lock or unlink the fields. The following macro uses a 'lock' approach, so that the references can be updated later on (by re-running the macro) if need be:
Code:
Sub AbbreviateCaptions()
Dim Fld As Field
For Each Fld In ActiveDocument.Fields
  With Fld
    If Left(.Result.Text, 6) = "Figure" Then
      .Locked = False
      .Update
      .Result.Text = Replace(.Result.Text, "Figure", "Fig.", 1, 1)
      .Locked = True
    End If
  End With
Next
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote