Forum Discussion

junaid2323's avatar
junaid2323
Copper Contributor
Feb 22, 2022

Looking for help with some text editing.

</li><li class="active-result" data-option-array-index="82">ADVANCES IN EXPERIMENTAL MEDICINE AND BIOLOGY , Discipline: BioChem , Country: United States
</li><li class="active-result" data-option-array-index="83">ADVANCES IN EXPERIMENTAL MEDICINE AND BIOLOGY , Discipline: Medicine , Country: United States
</li><li class="active-result" data-option-array-index="84">ADVANCES IN GENETICS , Discipline: BioChem , Country: United States

See the list above, I have a big list of journals upwards of 4000, I need to remove the HTML tags placed before each journal. is it possible with any shortcut or command?

Thank you. 

  • junaid2323 Assuming that each entry in the list is in a separate paragraph (Terminated with a pilcrow ¶ when the display of non-printing characters is actived), I would use a macro containing the following code

    Dim i As Long, j As Long
    Dim rng As Range
    With ActiveDocument
        For i = 1 To .Paragraphs.Count
            With .Paragraphs(i)
                j = InStrRev(.Range.Text, ">")
                Set rng = .Range
                rng.End = rng.Start + j
                rng.Delete
            End With
        Next i
    End With

     

Resources