stripping html

S

shank

I have a memo field that has html characters/tags and a lot of line breaks.
I've been using REPLACE nested about 8 deep and I'm still not getting
everything nuked. What's the easiest way to strip all that stuff and leave
only the text? Is there a function that will do this?

thanks!
 
T

Tom Ellison

Dear Shank:

I've done some work extracting data from HTML tables using the tags.
Haven't done what you require.

It occurs to me to use IE to display the text, select, copy, and paste it.
It may be possible to automate this from within Access. You may need to
coordinate with the IE experts. Try their newsgroups.

That way you can take advantage of all the software already written. A
manual test (put the text in a file, open it with IE) might be the first
step toward at least determining feasability.

Tom Ellison
 
T

Tom Ellison

Dear Shank:

Also, you can definitely perform some forms of automation from Access to IE.
In the work I mentioned I have done, we opened a web site, logged in user
and password, navigated to the required page, grabbed that page's html, and
closed IE. I expect the functions you might require are there as well.
Indeed, if the HTML you want to use as your source is live on the web, and
must be opened on a regular basis to get the most recent version of the
data, that can be automated as well.

Could you let me know how this goes for you? The feasibility of this
approach, or any other you find works for you, is of some interest to me.

Tom Ellison
 
S

shank

You took a left turn on me on think.... I have the text, including html
tags, in an Access table/field. Now I need to strip the tags away so that I
have just plain text. IE is not involved with this.
thanks!
 
T

Tom Ellison

Dear Shank:

I understand IE is not currently involved. But it could be a valuable tool
to solve your problem. You can display the HTML with IE, and you could
paste from that to get what you want, assuming you test it and it does so
when operated manually. Take a look at your html text using IE. Is that
the appearance you want? Paste from IE into notepad. Does that give you
what you want to see?

This is a simple test that might take 2 minutes. Paste the HTML text into
notepad first to save it as a file. Open that file in IE. Take a look.
Paste this back into notebook. Still look right? That's what Access would
see after you automate all of this. The automation to do this is pretty
simple, compared with trying to deal with every tag using your own software.
The software to do that is already written. It's apparently quite complex.
But, it's alread done. Sounds like a good deal to me, eh?

My point is that the software to display your text without seeing the HTML
is already written. You have had difficulty in rendering the HTML using
functions you write. IE may already have the functions necessary. So why
not use that to save time and gain reliability?

Tom Ellison
 
S

shank

OK... now I understand what you meant. However, I have some 500 different
products to strip. There's no time to fit IE into the process. I need a
fucntion to drop into Access that will handle this in seconds.
thanks
 
T

Tom Ellison

Dear Shank:

I guess you'll need to study HTML, at least to the extent it's used in your
data, and program all of it.

As an alternative, since I don't know enough about HTML to tell you every
twist and turn (you probably have already studied this from the perspective
of your specific requirements than I have) I'm thinking that the folks in
the IE newsgroup may be more useful to you. What you need is HTML
expertise, much more than Access expertise. Many of them are probably
acquainted with some form of Basic, perhaps specifically VBA, and may give
you what you want very easily.

Recommend you try posting there. OK?

Tom Ellison
 

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