How to select only bold text

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?

Marshall

Posted 2009-11-05T19:28:01.337

Reputation:

5What exactly do you mean by a document? A Word document, HTML, PDF? – Gerrie Schenck – 2009-11-05T19:35:22.383

1Also what operating system are you running? – John T – 2010-01-18T03:36:56.380

And what version of word ? – Rook – 2010-01-18T03:48:25.637

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 – 2010-01-18T03:49:38.613

Answers

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?

John T

Posted 2009-11-05T19:28:01.337

Reputation: 149 037