Visual Basic Help

Joined
May 2, 2012
Messages
1,291
Reputation
-28
Daps
2,431
Reppin
NULL
Hopefully one of y'all can help me out

I need to use visual basic to open a .htm file as a .txt, find a word and replace the word...then save the .txt file as the .htm

This needs to happen after a button is pressed in the program.

Possible?
 

Renkz

Superstar
Supporter
Joined
Jun 12, 2012
Messages
7,847
Reputation
2,365
Daps
18,160
Reppin
NULL
Hopefully one of y'all can help me out

I need to use visual basic to open a .htm file as a .txt, find a word and replace the word...then save the .txt file as the .htm

This needs to happen after a button is pressed in the program.

Possible?

Yes, it's possible. They have a library you can use to parse the html document using vb and is much more efficient as you can change the word by looking at the html tags instead looking at every line and getting false positives as you may change the tags in the html document.
I dont think you have to convert it a txt to replace the word, you can do it while it a html.




Html Agility pack | Learn how to use HtmlAgilityPack with tutorial & example
Examples
Read HTML File in VB.Net
Save | Learn how to use HtmlAgilityPack with tutorial & example
 
Top