Share via

Automatically highlight all text between a given set of characters?

Anonymous
2010-04-18T01:54:32+00:00

I'm writing a document and have some place holders that I've marked with [[*]] (where the * is a text description of the information that belongs in the place holder.

Is there a way to automatically highlight the brackets and text in the place holders so that they are easy to spot as a go through the document looking for them?

Thanks,

Rob

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

Anonymous
2010-04-18T03:14:37+00:00

A wild card search and replace should work:

Find:  ([[*]])

Replace with: \1 

and with the cursor in the replace box, click highlight.

Be sure that wildcard is checked.

Pam

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-04-18T04:29:54+00:00

    Pam,

    This works perfectly.  Thank you.  I've been wondering how to do a search and replace where a variable value in wasn't replaced.  I understand how the Find above works, but would you mind explaining or pointing me in the direction of a resource on how the "1" in the replace with: box works?

    Thanks,

    Rob

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-04-18T03:02:47+00:00

    Hi Rob,

    Actually, no. What would happen in the scenario described is that you would type [[ followed by a space and it would then appear as [[*]] with the requisite highlighting. You would then replace the * with the required text. This process therefore highlights the placeholder as you type it leaving you to edit the text between the brackets body of the text.

    Does that suit your need?

    Best,

    Sharon


    Sharon Roffey

    Queensland, Australia

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-04-18T02:52:28+00:00

    Thank you Sharon,

    The only problem is that the * in [[*]] is variable (it is different in every place holder).  The solution you propose would only work if the text between the [[ ]] was always the same right?

    Thanks again,

    Rob

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-04-18T02:34:39+00:00

    Hi Rob,

    My first thought on this was to use AutoCorrect.

    The AutoCorrect option would be perfect for this:

    1. Type [[*]], add suitable highlighting and select this text
    2. Click on the Microsoft Office button
    3. Click on the Word Options button
    4. Click on Proofing in menu on the left
    5. Click on the AutoCorrect Options button
    6. Click on the Formatted text option under Replace text as you type

    7. Type a brief code to (e.g. [[) the Replace: text box

       >> You will see that text you selected in 1. above will already be added in the With: text box and will show the highlighting if you selected the Formatted text

            as described above.

    1. Click on OK to confirm

    That should do the trick! Next time you type the characters [[ followed by a space you will get the formatted version.

    >>> Is this response helpful? If so, please consider clicking the green Vote As Helpful button for the benefit of future visitors with the same question.

    All the best,

    Sharon


    Sharon Roffey

    Queensland, Australia

    Was this answer helpful?

    0 comments No comments