Automatic formatting of entire line by character. Word

Solved
bjour Posted messages 8544 Registration date   Status Contributor Last intervention   -  
m@rina Posted messages 27811 Registration date   Status Moderator Last intervention   -
Hello,

I have a rather long and somewhat repetitive text in Word (2007) and I would like to automatically format (text color + bold) all the lines starting with a specific character.

Since Word does not have conditional formatting, maybe the find/replace function is useful, but I can't seem to achieve a result.

Thank you in advance for your help!

Best regards,

Configuration: Windows Vista / Christophe Colomb 1.4.9.2

--
Hello _ _ _ _ _ _

5 answers

  1. pépé35530 Posted messages 2951 Registration date   Status Member Last intervention   1 390
     
    Hello,

    You can use:

    Either the "Replace" function with the option to modify the font, color, etc...
    Or use the "Format Painter" button.
    Reminder: double-clicking on the button allows you to keep the function. To disable it, click the "Format Painter" button again.

    See you later

    grandpa
    0
  2. bjour Posted messages 8544 Registration date   Status Contributor Last intervention   4 079
     
    Good evening,

    thank you for your response. Reproducing the formatting has already got me started on the work, but it still requires clicking on each line where the character appears.

    However, I don’t see how to do it with search?
    Because you need to search for the character at the beginning of the line, then color the entire corresponding line.

    --
    hello _ _ _ _ _ _
    0
  3. pépé35530 Posted messages 2951 Registration date   Status Member Last intervention   1 390
     
    Good evening,

    The "search" command with the "match case" and "highlight" options
    allows the first searched letter (in uppercase) to be emphasized by highlighting it in yellow.

    Otherwise, a macro would need to be written.

    See you later

    pépé
    0
  4. m@rina Posted messages 27811 Registration date   Status Moderator Last intervention   11 568
     
    Hello,

    You perform a find-and-replace by checking the use of wildcard characters.
    To format all the characters of each line that starts, for example, with the letter A:

    Find: (^13A*^13)
    Replace with: \1

    You click on the More button, and in the dropdown list, you select Font, and you choose the format (font, color, bold, etc.)

    This is valid if your lines properly end with a paragraph return.

    m@rina

    --
    If you want to be helped effectively, make sure you are on the right forum,... and specify the software used as well as its version. We lack clairvoyants!
    0
  5. bjour Posted messages 8544 Registration date   Status Contributor Last intervention   4 079
     
    I admit your method is practical!

    I'm checking the wildcard characters, typing everything as you wrote it, parentheses as needed. But it only indicates paragraphs, or more precisely from the end of paragraph n to the end of paragraph n+1.

    Note that the character is >
    So I have (^13>*^13), which might mean something different for Word?

    --
    hi _ _ _ _ _ _
    0
    1. m@rina Posted messages 27811 Registration date   Status Moderator Last intervention   11 568
       
      The character > is already a wildcard character. Therefore, you need to precede it with a backslash, which gives:

      (^13\>*^13)
      0