|
-
Mar 20th, 2001, 11:55 PM
#1
Thread Starter
Lively Member
How to write a program remove hyperlinks in a email message. The extension of the mail is ".EML".?
Thank You!
-
Mar 21st, 2001, 01:22 AM
#2
PowerPoster
Open the email file in notepad and get to know the tag it uses to specify a hyperlink, i.e. the keyword immediately precedingand following the hyperlink. Once you get the keywords, open any file of same type and do a search for the keywords using Instr or any other function which you know which returns position of the searched word. Anything between the keywords that you had earlier known would be a hyperlink so replace the string, including both the keyword with empty string(just "").
-
Mar 21st, 2001, 10:36 AM
#3
Thread Starter
Lively Member
I don't understand. Do you have the source code. I am just a beginner. Thank You
-
Mar 21st, 2001, 10:56 AM
#4
Junior Member
I think what he means is you need to figure out what the tags look like. i.e <blah blah blah> or whatever that you want removed.
then just load the letter into a Rich Text Box RTB.LoadFile
Find the location of the first tag: x = inStr(RTB.Text, "<blah blah blah>")
Then the second Tag: y = InStr(x + 1, RTB.text, </blah blah blah>)
Find the closing bracket of the second tag: z = inStr(y, RTB.Text, ">")
then make a temporary string with the value of the entire tag: tempString = Mid(RTB.Text, x, z - x + 1)
Then just erase the undesired string: Replace(RTB.Text, tempString, "")
That's it.
"He who angers you conquers you." - Elizabeth Kenny
-
Mar 21st, 2001, 09:07 PM
#5
Thread Starter
Lively Member
Doubts
Thank You very much Aries ! Your method works for one link.
However, there are more than one link in the text file
How do I remove all of them? Do you know how to read
line by line. Can you teach me how to do it. What function of methods is to be use?
-
Mar 21st, 2001, 09:10 PM
#6
look at your other thread that I just posted to...that may help
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|