Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm using Word 2002. I have a document with both footnotes and endnotes. Actually the endnotes are to be manually inserted at the end of the document. The endnote references in the text are just superscript numbers. The author has an extra space in front of each endnote number. How would I phrase a search and replace to get rid of that space?

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Hi altdotcom,

    For real footnotes or endnotes, you can do this with a wildcard Find/Replace, where:
    Find = ( {1,})(^2)
    Replace = \2

    For superscripted numbers, unless the preceding space is also superscripted, you'll need a macro like:
    Code:
    Sub Demo()
    With ActiveDocument.Range
      With .Find
        .ClearFormatting
        .Text = ""
        .Font.Superscript = True
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindStop
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute
      End With
      Do While .Find.Found
        Do While .Characters.First.Previous = " "
          .Characters.First.Previous.Delete
        Loop
        .Collapse wdCollapseEnd
        .Find.Execute
      Loop
    End With
    End Sub
    The above code will also handle real footnotes and endnotes.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I'll try it.
    Clark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •