From: Larry on 24 Jun 2010 13:52 But, using the syntax you gave me, sText = Replace(sText, Chr(147),Chr(34)) I've been trying to do something else, and can't get it. When I copy multiple paragraphs, I want to change the paragraph break between paragraphs (as well as the end of last paragraph) to the paragraph break plus html tag <p>, like this: So I want to change this: Gen. McChrystal resigned today. Pres. Obama accepted his resignation. to this: Gen. McChrystal resigned today.<p> Pres. Obama accepted his resignation.<p>
From: Mayayana on 24 Jun 2010 16:19 | | So I want to change this: | | Gen. McChrystal resigned today. | | Pres. Obama accepted his resignation. | | to this: | | Gen. McChrystal resigned today.<p> | | Pres. Obama accepted his resignation.<p> | I don't quite follow that. you realize that a <P> needs a </P>? In any case, you can use any string with Replace. It doesn't have to be a single character. You'll have to check what you're getting in between pragraphs. If it's vbCrLf & vbCrLf you can use something like: s = Replace(s, vbCrLf & vbCrLf, vbCrLf & vbCrLf & "<P>") I leave a number of scripts on my desktop for that sort of thing. For instance, I've got one that converts a DOC to plain text, one that makes sure a text file is ANSI, and one that fixes returns in Unix file downloads or other file types that don't use vbCrLf for returns.
From: Larry on 24 Jun 2010 20:00 Yes, that works. Thanks very much. You wrote: > I don't quite follow that. you realize that > a <P> needs a </P>? I'm not sure what you mean. Each paragraph break takes a <p>. I've never seen an html tag "</p>". Larry
From: Mayayana on 24 Jun 2010 21:12 | | I'm not sure what you mean. Each paragraph break takes a <p>. I've never | seen an html tag "</p>". | That's the closing tag. Most HTML tags have a closing tag, except things like <BR> that don't cover any defined area. It sounds like you need an HTML reference. :)
From: "Dave "Crash" Dummy" on 25 Jun 2010 07:31
Mayayana wrote: > | > | I'm not sure what you mean. Each paragraph break takes a <p>. I've never > | seen an html tag "</p>". > | > > That's the closing tag. Most HTML tags have a closing > tag, except things like <BR> that don't cover any defined > area. It sounds like you need an HTML reference. :) Like this: http://www.w3schools.com/tags/tag_p.asp -- Crash "Patriotism is the last refuge of a scoundrel." ~ Samuel Johnson ~ |