Share via

Replacing text only in footnotes

Anonymous
2015-05-17T16:20:14+00:00

Another question about search and replace.

Is there any way of restricting replacements to occurrences of the search string that appear in footnotes only?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jay Freedman 207.7K Reputation points Volunteer Moderator
2015-05-17T18:48:40+00:00

There are a couple of ways to do that.

Since Word automatically applies the Footnote Text style to footnotes as they're created, you can limit the Find/Replace to text having that style (assuming you haven't changed the style of any footnotes). In the Find/Replace dialog, click the More button to expand the box. Click in the Find What box, click the Format button at the bottom left, click Style, and select Footnote Text in the style list. Set up the rest of the Find What/Replace With entries as needed, and click the Find Next or Replace All button.

If you're doing this in a macro, it's even easier. Declare a Range variable and set it equal to ActiveDocument.StoryRanges(wdFootnotesStory); use the Find method of that range to do the replacements.

    Dim rg As Range

    Set rg = ActiveDocument.StoryRanges(wdFootnotesStory)

    With rg.Find

        .Text = "find this"

        .Replacement.Text = "replace with this"

        .Execute Replace:=wdReplaceAll

    End With

Was this answer helpful?

5 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Doug Robbins - MVP - Office Apps and Services 323K Reputation points MVP Volunteer Moderator
2017-03-02T22:06:50+00:00

Replace

 With oRng.Find

with

 With rng.Find

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Jay Freedman 207.7K Reputation points Volunteer Moderator
2015-05-18T16:26:28+00:00

Hi Rodney,

No, the Text Effects aren't available through the Find/Replace dialog. If you need to apply that kind of formatting, you'll have to use a macro. It would be similar to the one I showed before, but applying the effect in addition to (or instead of) changing the text.

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-03-02T23:05:14+00:00

    Excellent!  Thanks Doug that worked!

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2015-05-18T10:52:17+00:00

    Jay

    Many thanks; that worked fine.

    At the risk of pushing my luck, is there any way of using the 'Text Effects' feature as part of the Replace action?  e.g. Gradient Fill - Gray  This seems to be one option that is not on the font tab.

    Rodney

    Was this answer helpful?

    0 comments No comments