Simple <> markup based on direct styles

J

Joe

I'm not having luck. Any suggestions?
I want a macro to scan a document and for every bit of text that is
bold, I'd like it to wrap that text in simple <b> </b> tags.
In addition to <b> </b> bold
I'd like
<i> </i> italic
<u> </u> underline
<c> </c> small caps
<sup> </sup> superscript with smaller font size
<sub> </sub> subscript with smaller font size

I'd also like it if it would find all Red text and place <red> </red>
around the text.... same for Gray, Green, Blue, Yellow, Orange,
Brown...
Can text color be identified by these color names instead of values? I
was guessing I'd have to be coloring text in Word using the "List:
Apple" name values for that part to work.

The goal is so that I can then save as a plain text file and retain
that simple markup.
Any help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top