Share via

Word Select text

Anonymous
2024-11-25T20:06:47+00:00

Hello from Steve

Objective select text VBA please

Melanie OGorman

Gregory McFarlane

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

HansV 462.6K Reputation points
2024-11-25T21:59:57+00:00

This perhaps?

[A-Z][A-Za-z]{1,} [A-Z][A-Za-z]{1,}

In a macro:

Sub Test()
    With Selection.Find
        .ClearFormatting
        .Text = "[A-Z][A-Za-z]{1,} [A-Z][A-Za-z]{1,}"
        .MatchWildcards = True
        .Execute
    End With
End Sub

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-11-25T22:18:20+00:00

    Hello HansV

    Brilliant and I thank you.

    All the Best

    Steve

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-11-25T21:38:09+00:00

    Hello HansV

    Melanie OGorman

    The below Selects the above

    [A-Z][a-z]{1,} [A-Z][A-Z][a-z]{1,}

    Gregory McFarlane

    The below Selects the above

    [A-Z][a-z]{1,} [A-Z][a-z][A-Z][a-z]{1,}

    Objective is there a script that will Melanie OGorman or Gregory McFarlane

    All the Best

    Steve

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2024-11-25T21:09:46+00:00

    Please explain in more detail what you want to do.

    Was this answer helpful?

    0 comments No comments