Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2015, 07:46 AM
gmaxey gmaxey is offline Find superscript numbers with a prefix of some default text Windows 7 32bit Find superscript numbers with a prefix of some default text Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default


Which above macro? There are three:

Code:
Sub ScratchMacro()
     'A basic Word macro coded by Greg Maxey
    Dim oRng As Word.Range
    Set oRng = ActiveDocument.Range
    With oRng.Find
        .Text = "Ref."
        While .Execute
            Do While oRng.Characters.Last.Next Like "[0-9]" _
                And oRng.Characters.Last.Next.Font.Superscript
                oRng.MoveEnd wdCharacter, 1
            Loop
            If Len(oRng.Text) > 4 Then
              oRng.Select 'Do something with the found range.
            End If
            oRng.Collapse wdCollapseEnd
        Wend
    End With
lbl_Exit:
    Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Tags
find, numbers, superscript



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace BETWEEN numbers WordUser2015 Word 4 12-19-2014 02:09 PM
Show Page Numbers by default zamani_2012 Word 1 06-09-2014 06:09 AM
Macro to find text only footnote numbers TimFromPhx Word VBA 7 04-10-2014 07:05 PM
Find and replace page numbers in body of text tollanarama Word 3 02-13-2011 06:00 AM
Find superscript numbers with a prefix of some default text Find & Replace words with "/" prefix & suffix tollanarama Word 4 01-25-2011 02:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:08 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