Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2012, 04:00 AM
myusername myusername is offline Making cross-reference say "Fig." instead of "Figure" Windows XP Making cross-reference say "Fig." instead of "Figure" Office 2003
Novice
 
Join Date: Aug 2012
Posts: 2
myusername is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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
Thank you for the nice code. I found it useful. It is possible to the the same to also change the label at the figure captions. i.e. after application of the macro it says 'Figure 8' at the caption but 'Fig. 8' in the reference. Can the macro be modified to change the label in the figure caption too?
best regards


Nils
Reply With Quote
  #2  
Old 08-30-2012, 04:20 AM
macropod's Avatar
macropod macropod is offline Making cross-reference say "Fig." instead of "Figure" Windows 7 64bit Making cross-reference say "Fig." instead of "Figure" Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,513
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

Quote:
Originally Posted by myusername View Post
Thank you for the nice code. I found it useful. It is possible to the the same to also change the label at the figure captions. i.e. after application of the macro it says 'Figure 8' at the caption but 'Fig. 8' in the reference. Can the macro be modified to change the label in the figure caption too?
best regards
Nils
If you create a new caption label to say 'Fig.' instead of 'Figure', and use that when you insert the caption, that's how it will display - and you won't need the macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-30-2012, 04:33 AM
myusername myusername is offline Making cross-reference say "Fig." instead of "Figure" Windows XP Making cross-reference say "Fig." instead of "Figure" Office 2003
Novice
 
Join Date: Aug 2012
Posts: 2
myusername is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
If you create a new caption label to say 'Fig.' instead of 'Figure', and use that when you insert the caption, that's how it will display - and you won't need the macro.
Too late for that I am afraid; too many instances to change manually
Thank you for your fast reply
Nils
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making cross-reference say "Fig." instead of "Figure" Issues with Word 2007: making "--" into "—" kg28 Word 1 02-04-2012 01:33 PM
How to edit the "Format" and the "show level" of an EXISTING table of content? Jamal NUMAN Word 2 08-14-2011 10:46 AM
Making cross-reference say "Fig." instead of "Figure" "Table of content" based on "Normal Style" behavior!!!! Jamal NUMAN Word 4 07-08-2011 04:12 AM
Making cross-reference say "Fig." instead of "Figure" How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
"Microsoft Excel Application" missing in the "Component Services" on win08 sword.fish Excel 0 02-26-2010 02:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft