How to write a program remove hyperlinks in a email message. The extension of the mail is ".EML".?
Thank You!
Printable View
How to write a program remove hyperlinks in a email message. The extension of the mail is ".EML".?
Thank You!
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 "").
I don't understand. Do you have the source code. I am just a beginner. Thank You
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.
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?
look at your other thread that I just posted to...that may help :D