Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-03-2013, 04:40 AM
macropod's Avatar
macropod macropod is online now Convert "Figure", "Figure", "Figure" to "Figure1", "Figure2", etc. Windows 7 32bit Convert "Figure", "Figure", "Figure" to "Figure1", "Figure2", etc. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Indeed, if you had used the Caption Style, it would have been a simple matter of Ctrl-A, F9.

For what you now have, you'll need a macro like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Integer
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "Figure:"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    i = i + 1
    .Text = "Figure" & i & ":"
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Application.ScreenUpdating = True
MsgBox i & " figures updated."
End Sub
FWIW, deleting the old numbers as you've done doesn't really help - the code to replace the old ones could have been almost the same.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert "Figure", "Figure", "Figure" to "Figure1", "Figure2", etc. Making cross-reference say "Fig." instead of "Figure" dgalb Word 17 11-09-2014 06:25 AM
'Linking' entered information to other "cells" from an original "cell" in MS Word Wade Word 6 09-03-2012 05:22 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
Convert "Figure", "Figure", "Figure" to "Figure1", "Figure2", etc. 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 10:07 PM.


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