0

How can you select all of the bold text in a document? I would like to just extract bold text from numerous documents. Is there a script that could be run?

4
  • 5
    What exactly do you mean by a document? A Word document, HTML, PDF? Nov 5, 2009 at 19:35
  • 1
    Also what operating system are you running?
    – user1931
    Jan 18, 2010 at 3:36
  • And what version of word ?
    – Rook
    Jan 18, 2010 at 3:48
  • You do know that you can select all text that is under a certain style, so if one has properly edited the document something like that would be possible. Unfortunatelly, if no such option exists, I think it i snot possible. Word doesn't offer selection by text properties.
    – Rook
    Jan 18, 2010 at 3:49

1 Answer 1

1

If you are referring to Word documents, you can use a VBA macro:

Open "C:\boldtext.txt" For Append As #1
Selection.Find.Font.Bold = True
Write #1, Selection.Find.Text
Close #1

If it works as planned, it should add all bolded text in a document to a text file C:\boldtext.txt, where of course, it will no longer be bolded. I've never used VBA, just looked through a tutorial briefly and came up with this, maybe someone can test this for me?

You must log in to answer this question.