Build macros

B

Barry

Hi guys

I want a macro that turns this text....

This is some text.

into this text

<p>THIS IS SOME TEXT.</p>

Ive just added ALL CAPS and HTML tags to the beginning and end of teh text.

I dont seem to be able to figure out a way to do this since the text has the
be highlighted and unhighlighting it seems to turn off the macro recording
off when I move the cursor.

Cheers in advance
 
S

Steve Rindsberg

Hi guys

I want a macro that turns this text....

This is some text.

into this text

<p>THIS IS SOME TEXT.</p>

Ive just added ALL CAPS and HTML tags to the beginning and end of teh text.

I dont seem to be able to figure out a way to do this since the text has the
be highlighted and unhighlighting it seems to turn off the macro recording
off when I move the cursor.

I can tell you how to do it in PowerPoint, but I expect that's not what you're
after. Might want to mention the app you're doing this in.

Dim sText as String

' assuming you can pull the text in from somewhere ...
sText = "This is some text."

sText = "<p>" & uCase(sText) & "</p>"

' and put the text back where it came from
 

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