How do I search for a colour


  • Hi everyone,

    I used a brown text 2 on one document but I couldn't find it on n new document I opened. I tried looking for it where the colours are - 'theme' colours, 'standard colours' and 'more colours'. 

    • Dipindahkan oleh Cindy Meister MVP Jumat, 16 November 2018 17.10 about using special colors in the UI, not dev-related
    Kamis, 15 November 2018 15.17

Semua Balasan

  • Hi SiyandaQ,

    Do you want to use code to achieve that?

    If so, here's a sample code of find text of a certain color and insert a space ahead of it:

    Sub ChangeColorWithReplace()
        Selection.Find.Font.Color = RGB(120, 48, 191)
        With Selection.Find
            .Text = ""
            .Replacement.Text = "^&test"
            .Forward = True
            .Wrap = wdFindContinue
            .Format = True
            .MatchCase = False
            .MatchWholeWord = False
            .MatchKashida = False
            .MatchDiacritics = False
            .MatchAlefHamza = False
            .MatchControl = False
            .MatchByte = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    End Sub

    For more information, please review the following link:

    Word VBA Find text of a certain color and insert a space ahead of it

    Hopefully it helps you.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Jumat, 16 November 2018 02.10
  • I think you should ask this on the "Answers" site. This forum is for programming questions. When you ask, be sure to include information such as which version of Word you use. Also tell them whether the document where you used the color you can't find: is it a document you created or was it sent to you by someone.

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Jumat, 16 November 2018 17.09