Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Replacing Tags In An Html Doc Using Vb6

i want to replace certain tags in an external html document with text from textboxes from a vb6 form.

i would like code that searches through the html doc line by line, replacing specific tags that i want. using the replace function

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Dhtmledit Control Load Html File When Buttons(table Tags, Show All, Para Tags) Clicked

I am using dhtmledit control to load html document for edit and save changes.

on the form 3 buttons which provides functionalities show all, show table tags, show para tags
when clicked on "show table tags" displays entire html content
when clicked on "show para tags" displays all <p> tags

i want to save the changes when user clicks on any of these three buttons and edit the text

Can I Use HTML Control To Display My Form With HTML Tags?
HTML tags are flexible in term of using links, images and so on. Is it
possible to HTML inside the VB from?


Get Tags Inner Html
Is the way how to get inner html of some tag by webbrowser control?
for example:
i hava html page with source
<b>Bold text</b>
and i want to get inner html of tag <b> which is Bold text.
Can someone help me?

Thanks in advance.

***HTML TAGS!***
Hi! I'm currently creating a control that will highlight and color html tags and I need more tags to colorize. Just post as many html tags as you can so that I can take them and colourize them. Any color suggestions would be helpful too !

PS: I already have:

<IMG src="">
<A HREF="">

Removing &lt;*&gt; Tags From Html

i am having a few problems with this script :

'cut the crap out
Do While InStr(strProperBits, "<") <> 0
intStartPos = InStr(strProperBits, "<")
intEndPos = InStr(strProperBits, ">")
intLength = intEndPos - intStartPos
Mid(strProperBits, intStartPos, intLength) = " "
MsgBox intProperBits
what im trying to do:

i have html code for a page, and i wish to get rid of the all tags in the code, to make it easier to read, and edit for people who don't understand any html
at the moment, my problem is that whenever the program gets the code, the first character is not a "<" which it should be, but one of the boxes. i hope you know what i mean, just a small box, and im unsure how to make it display the correct character.
i spose i could try a replace() function, but im not sure what the alt+code is for the box character, or what ascii number it is

thanks in advance

Removing Html Tags
I'm using the inet xfer control to grab a text-based webpage. The contents of this page are thrown into a string. However, I want to take the contents of this string and remove ALL HTML tags so i am just left with the relevant data. How do I do this?

P.S. I ALSO will probably need spaces or some sort of delimiter to seperate each piece of data (word/number) so that I can grab what I need later.

Couloring HTML Tags
Ok, on previous peoples help I have managed to get all the HTML tags in a document to appear in blue text using the code:

Private Sub ColorHTML(RTF As RichTextBox)

Dim sHTML As String
Dim nTagOpen As Long
Dim nTagClose As Long
Dim nI As Long

Dim nColor As Long

sHTML = rtfText.Text
nTagClose = 1

With rtfText
For nI = 1 To Len(sHTML)
' *** See where the next tag starts.
nTagOpen = InStr(nTagClose, sHTML, "<")
If nTagOpen = 0 Then Exit For

' *** See where the tag ends.
nTagClose = InStr(nTagOpen, sHTML, ">")
If nTagOpen = 0 Then nTagClose = Len(sHTML)
If nTagClose = 0 Then nTagClose = Len(sHTML)
' *** Color the tag.
.SelStart = nTagOpen - 1
.SelLength = nTagClose - nTagOpen + 1
.SelColor = &HAA0000
End With

End Sub

However, I don't want any Commented out Tags to be blue, so I thought I could do:

Dim blComment as Boolean

If Mid(sHTML, nTagOpen, 4) = "<!--" Then
.SelStart = nTagOpen
.SelLength = 4
.SelColor = &H0&
blcomment = True
End If

and change the last bit as necessary. But I can't work out how to find the end Comment Tag "-->" and change it back to blue again for normal tags - it just does nothing when it encounters the rest of the tags.

I have an interview on Friday and I'd like to be able to show them something....

One other thing. I used to use a normal Text Box, and changed to an RTF to do Search/Replace and this, however since doing that my Paste from Clipboard pastes two of everything Copied.

Here's my code

Private Sub mnuEditPaste_Click()
On Error Resume Next
'ActiveForm.rtfText.SelRTF = Clipboard.GetText
'Temp = Clipboard.GetText(1)
ActiveForm.rtfText.SelText = Clipboard.GetText 'temp
'Clipboard.SetText = Temp
End Sub

Private Sub mnuEditCopy_Click()
On Error Resume Next
'Clipboard.SetText ActiveForm.rtfText.SelRTF
Clipboard.SetText ActiveForm.rtfText.SelText, 1
End Sub

Private Sub mnuEditCut_Click()
On Error Resume Next
'Clipboard.SetText ActiveForm.rtfText.SelRTF
'ActiveForm.rtfText.SelText = vbNullString
Clipboard.SetText ActiveForm.rtfText.SelText, 1
ActiveForm.rtfText.SelText = vbNullString
End Sub

Noticed I omitted using SelRTF as a) it still pasted 2 of everything and b)pasted RTF tags in the Search/Replace box when I wanted to paste text in there to find.

Thanks in advance


Html Remove All Tags
how can i remove all html tags in html files?
For example,
// start
<td><a href="a.html"><font size="3">A</a><br>1<br>2</td>
<td><a href="b.html"><font size="3">B</a><br>3<br>4</td>
// end

Then, change to:
A 1 2
B 3 4

Remove HTML Tags

how can i remove all HTML tags from an HTML page..!!

Remove HTML Tags

I have a rich text box, and I want it so that if any text is entered; it will remove any <i> or <b> tags. How do I do this? (By the way, the data is entered all at once.)


Parse Between Html Tags
whenever i grab the source code of a site i get these html tags
onMouseOut="d()" class="B"></a></li><li><a title="US" onMouseOver="s('US')" onMouseOut="d()" class="A"></a>
my question is how can i parse out the info between class="B">DATATOBEPARSED</a> and class="A">DATATOBEPARSED</a> into one listbox or listview?

Problem Getting Value Between Html Tags
Hi all i have this application that loads html and it needs to search trough all the html and list the numbers between VALUE=" and "></td> .I mean i want to collect bold number :VALUE="3018"></td>.

My program what it does now it outputs like this with some extra things:


but i want it to look like this this


i tried many things i could not remove the extra album.php?show_albums, and extra " from output url . I be happy if some one help me fix these problems.I bolded importent part.Thanks

Html code hast mane of this type of blocks

VB Code:
<tr>    <td align="center" scope="row">1</td>    <td align="center"><INPUT TYPE="Checkbox" NAME="song_id" ONCLICK="reviewSelection();" [b]VALUE="[/b]3018[b]"></td>[/b]    <td><a href="#" class="song_title" onclick="loadPlayer('3018');return false;"> my life</a> </td>    <td align="center">&nbsp;</td>    <td align="center">&nbsp;</td>  </tr>

my code:

VB Code:
Private Sub Command1_Click(Index As Integer) Select Case Index    Case 0:        If txtURL.Text <> "" Then            RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)        End If        Case 1:        EndEnd SelectEnd Sub  Private Sub Command2_Click() Dim sResult() As String, n As Long               If GetLine(RichTextBox1.Text, "[color=Red]VALUE=[/color]", " [color=Red]></td>[/color] ", sResult) Then        ' Occurances were found and have been placed in the array              Text1.Text = "http://localhost/new/player.php?song"         For n = LBound(sResult) To UBound(sResult)          List1.AddItem sResult(n)          Text1.Text = Text1.Text & "[color=Red],[/color]" & Split(sResult(n), "=")(1)         Next n                                '--------------- end of making url code                    Else        ' No occurances were found    End IfEnd Sub    Private Function GetLine(ByVal sText As String, ByVal sStart As String, ByVal sEnd As String, ByRef sArr() As String) As Boolean    Dim lPos As Long, lEnd As Long, lCount As Long, sTemp() As String        ReDim sTemp(100)        lPos = InStr(1, sText, sStart, vbTextCompare)    Do While lPos        lEnd = InStr(lPos, sText, sEnd, vbTextCompare)        If lEnd Then        'Remove & sEnd from the below line.        'sTemp(lCount) = Mid$(sText, lPos, lEnd - lPos) & sEnd            sTemp(lCount) = Mid$(sText, lPos, lEnd - lPos)            lPos = InStr(lEnd, sText, sStart, vbTextCompare)        Else            sTemp(lCount) = Mid$(sText, lPos)            lPos = 0        End If        lCount = lCount + 1        If lCount > UBound(sTemp) Then ReDim Preserve sTemp(100 + lCount)    Loop     If lCount > 0 Then        ReDim Preserve sTemp(lCount - 1)        sArr = sTemp    End If    GetLine = lCountEnd Function

Html Tags Into Shellexecute
i intend to send a email in vb6
and i knw shellexecute can do tat
but can i use html tags into the email body??
i need to use html tags to make my email become more flexible
anyone got idea??


VB Code:
R = ShellExecute(Me.hwnd, "Open", "" & _                    "?cc=" & "" & _                    "&bcc=" & "" & _                    "&subject=" & "title" & _                    "&[color=Red]body[/color]=" & Replace("hello", vbCrLf, _            "%0D%0A"), _            vbNullString, App.Path, vbNormalFocus)

Filter HTML Tags
hi i have a question about filtering:

I let my vbproject fetch info form a web server, the only problem is
it also downloads the HTML tags.

does anyone knows how to filter those?

Change Html Tags
How do you change all the letters inside all tags < > while ensuring the cursor to be where it should be?

Extracting HTML Tags!
Hi there,

I'm developing a Lottery Syndicate program within VB6 as part of a project, and I'm trying to extract specific information from the HTML code off the offical Lottery website in order to check each members numbers against the official results (Access 2000 & SQL Application).

As yet I've managed to download the webpage source code into a Rich Textbox using the Internet Transfer Control (Inet). My problem lies in how to extract the relevant parts of this code to say several text boxes or variables.

To download the source code into the Rich Textbox I've used the following code:

Private Sub Command1_Click()'Get Results Command Button
RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)
End Sub

where txtURL is simply a standard text box holding the URL of the webpage.

Below is a sample of the type of source code that appears in the Rich Textbox when downloaded:

<IMG SRC="images/results/onresu02.jpg" ALT="Saturday" WIDTH=152 HEIGHT=37 BORDER=0><br>
The winning balls for draw number 654 on 30 March 2002 were:<BR CLEAR=ALL><IMG SRC="images/results/numbers/num08.gif" ALT="08" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/numbers/num14.gif" ALT="14" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/numbers/num25.gif" ALT="25" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/numbers/num36.gif" ALT="36" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/numbers/num38.gif" ALT="38" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/numbers/num47.gif" ALT="47" WIDTH=53 HEIGHT=54 BORDER=0>
<IMG SRC="images/results/bonus/15.gif" ALT="Bonus Ball 15" WIDTH=83 HEIGHT=68 BORDER=0><BR CLEAR=all>

The information I want to extract lies in each of the ALT tags, i.e. the Numbers 08, 14, 25, 36, 38, 47 and 15.

Has anyone got any idea on how I could systematically read through each line of code, extract the relevant information when encountered, and finally populate a different text box with each number!

Any suggestions would be greatly appreciated!

Thanks in advance: GT.

Converting .xtg Tags To Html (Used To Be: Need Help!)
I have a .xtg file(it is a file generate by XPress Tags for QuarkXPress).I want to convert the tags from this file in Html tags.
Could anyone tell me, how can I do that?It 's urgent!
Exemple of a .xtg file:

"<I>If the document has not been<$> <B>saved during this session, or if any pictures have been updated<$>,<cMf"CourierNewPSMT">an alert is displayed asking OK to save document before continuing with Collect for Output? <c$f$> <Bc"Red">Click Save to continue. <$c$f"Impact">If the document has never been<f$> saved, <c"Blue">the Save as dialog box displays. <c"Green">Enter a name in the Save current document as field; then, click Save to continue"

Adding HTML Tags From VB 6.0
I am looking for a code that would help me to add HTML tags
(Bold,Italics, Underline, Paragraph marks) to a word document.
Actually i am trying to get the hidden codes present in the word
document to identify the above said properties. Any help would
reg this would be thankful.

I can say that u can also refer to crosseyes,it identifies the
bold, italics present in the word document. I need a code that
would add a prefix/sufix the properties of the word documents.

R. Suresh

Problem Getting Value Between Html Tags
Hi all i have this application that loads html and it needs to search trough all the html and list the numbers between  VALUE="  and "></td> .I mean i want to collect bold number :VALUE="3018"></td>.

My program what it does now it outputs like this with some extra things:


Query: Vb && Html Tags

I have various html files

A sample html is given below

<FONT FACE="Goudy" SIZE=2>(190 </FONT><FONT FACE="MathematicalPi 1" SIZE=2>2</FONT><FONT FACE="Goudy" SIZE=2> 100)/100 </FONT><FONT FACE="MathematicalPi 1" SIZE=2>5</FONT><FONT FACE="Goudy" SIZE=2> 90 percent.</FONT>
<FONT FACE="Goudy" SIZE=2>change in nominal prices. Table 1.1 indicates that the nominal prices of some goods, such as college tuition, rose by much more than the average 90 percent</FONT>
<FONT FACE="Goudy" SIZE=2>(190 </FONT><FONT FACE="MathematicalPi 1" SIZE=2>2</FONT><FONT FACE="Goudy" SIZE=2> 100)/100 </FONT><FONT FACE="MathematicalPi 1" SIZE=2>5 8</FONT><FONT FACE="Goudy" SIZE=2> 90 percent.</FONT>

In the documents tags like
A. <FONT FACE="MathematicalPi 1" SIZE=2>5</FONT> and

B. <FONT FACE="MathematicalPi 1" SIZE=2>5 8</FONT> etc occurs frequently.

Now what is need is to find out tags similar to "B" and insert opening and
closing tags so that it looke like this

<FONT FACE="MathematicalPi 1" SIZE=2>5</FONT><FONT FACE="MathematicalPi 1" SIZE=2>8</FONT>

How do i go about doing this.

Hope some Guru Out there can help me solve this.

Thanks in Advance

Retrieve All Possible Html Tags

I have a small question about html tags.
I need to fill al listbox with all htmltags that are available.

Can i use HTMLElementCollection or something like that?

I thought of

dim c as HTMLElementCollection
dim e as HtmlElement

for each e in c
next e

But that doesn't work.

Can anyone tell me how to obtain all html elements? (like a, br, table, tr, body ...)

Thanks alot


Edited by - marijsandy on 4/13/2005 3:34:34 AM

Removing HTML Tags From Text
I am hoping there is a simple way around this, and any suggestions would be greatly appreciated...

I am using VBA to read text from a database and create a table in a word document. This same database is also used to create an online version of the document, so it contains some simple HTML style tags for formatting, most commonly line breaks. Everything works fine, except that the HTML tags show up as plain text. I would like to hide or delete these tags and replace them with the proper formatting in the table cell. Is there an easy (or not so easy) way to do this?



Help Please. I Wish To Get HTML Tags From Part Of Web Pages

I am trying to get the html tags from a part of a web page ( a part that I highlight). I can get the tags from a whole page but am trying to select part of a page and then Drag it to a drop area and then get the list of Links from that portion of a page.

Any help would be appreciated.

Help {Parsing HTML Tags With Inet}
im useing inet to get the source code for a page and put it in a text box. That part i did fine, the second part i have no cule on... I want to edit out all the html < tags > only leaveing the natural text. i know its possable but i dont know how to do it. can anyone help?


Remove HTML Tags ?? Elimination
Hi there!
i had a question how can i remove all the Html tags before they display on the rich text box?

I would like to have only the text on the html page.

how do i eliminate the html tags...
basically how to i Filter only text.

i was thinking of havinf it in a way that :

-don't show anycharacters between < > and show only characters between > <

please advise that you

Good Html Tags Parser?
Hi there !
Does anybody know where i can get the source code of a good
html parser ?

I want it to notice also the ' characters inside the " " characters.
For example if the tag is
<img src="mypic.jpg" onmouseover="window.status='aaaaa' "
onmouseout='window.status="hello" ' >

i want it to get the attributes of the img they should be

onmouseout="window.status=""hello"" "

i used to use the HTML DOM from the MSHTML library of microsoft.
But this does almost screw all tags and their attributes and they become useless.
For example if <img src="mypic.jpg"> the
img.src becomes

microsoft did a lot to screw with this !

Please help!

How can you find the source of an image? (i.e. <IMG SRC="x">, find the x)? Some code would be nice, I'm still new with VB...

Remove Tags From Html File

How I remove Tags from file with extension html, via VB or Stored Procedure

Thank You very much

How can a program parse HTML code for <A> tags? Then, once inside the tag, find the string: href="mailto:". I need to extract a database of people with e-mail adresses and I need to isolate only the e-mail adress, excluding "?subject=". For example,

<A href="">

And vb finds only, ""? Some code would help, im fairly new to VB

Html Tags Inside Richtextbox
Hi VB guru,

    I'm learning to create a html editor just like Dreamwaver.... , where i use webbrowser (down) and richtextbox (up). whatever html tag I type on richtext box i get it on webbrowser!

what i want to do is, to show html tags in blue or whatever color and Text color in black in richtextbox! Just like Dreamwaver...
I've seen it doing by some vb master long time ago... can u teach me?

Converting HTML Tags In Outlook

I have a button in my VB application that opens MS-Outlook filling the message body by HTML code. but the outlook insert the HTML tags into the message body instead of converting HTML tags to their effects (drawing TABLE, changing FONT, ... and so on). How can I change the way Outlook receives the message body?

Here is my Code:


Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOW = 1

Private Sub Navigate(ByVal NavTo As String)
  Dim hBrowse As Long
  hBrowse = ShellExecute(0&, "open", NavTo, "", "", SW_SHOW)
End Sub

Private Sub cmdSendEmail_Click()
Navigate "" & _
         "There is something I want to tell you&body=" & _
         "<HTML><BODY><FONT face='arial' size='5' color='red'>some text</FONT><BODY></HTML>"
End Sub


MIDI In HTML Using Basic Tags
MIDI in HTML using basic tags
Is there any way to play midi music in HTML in a simple manner like playing mp3's in <bgsound src="music.mp3">?
<bgsound src="sound.midi"> does not seem to work.
MSDN uses DirectAnimation which I don't want to use.

Convert Html Tags When Importing Into Word

Originally Posted by Wamphyri

You could use a find replace method to take care of your problem. Here's an example of taking care of Bold and Italics. You could do the same for any other formatting tag you need.

'Add bold
With ActiveDocument.Range.Find
.MatchCase = False
.MatchWildcards = True
.Text = "[<][bB][>]*[<]/[bB][>]"
.Replacement.Font.Bold = True
.Execute Replace:=wdReplaceAll
End With
'add italics
With ActiveDocument.Range.Find
.MatchCase = False
.MatchWildcards = True
.Text = "[<][iI][>]*[<]/[iI][>]"
.Replacement.Font.Italic = True
.Execute Replace:=wdReplaceAll
End With
'Delete all tags
With ActiveDocument.Range.Find
.MatchCase = False
.MatchWildcards = True
.Text = "[<]*[>]"
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
End With

Unfortunatelty for me, This slick code doesn't work on Formatted Text, I heard there is a formatted text replace function, but I am unable to locate it.

Any Ideas?

Convert Html Tags When Importing Into Word
Hello, My question is this I am creating a Word Document in VBA and I am trying to insert text being pulled from a SQL database. The text that I am inserting has HTML formating tags like <b>BOLD</b> and <i>Italics</i> because the same data being used by a WEB Site. Does anyone now how I can get Word to read/convert these tags so the text is displayed in italics or bold where applicable. I have bee playing with the Range.PastSpecial command but I am having no luck. The only way I can get the data on the clipboard is by first writing it to the document then cutting it and when I try to paste it back using PasteSpecial it nows the text came from a Word Document so it won't allow me to paste as HTML. PLEASE HELP

Converting Word Styles To Html Tags
i am trying to write a VBA program that will read the text in a word document, find text that is bold or italic, and insert html <b> and </b> or <i> and </i> tags around the specific text. i am fairly new to vba, and so far this is as far as if have got:

For Each para In ActiveDocument.Paragraphs
If para.Range.Words(1).Style = ActiveDocument.Styles _
(wdStyleHeading3) Then
para.Range.Words(1).Text = "<tag>" & para.Range.Words(1).Text

para.Range.Words(para.Range.Words.count).Text = _
para.Range.Words(para.Range.Words.count).Text _
& "</tag>"
End If
Next para

All this does is create an infinite loop of repeating "<tag>" and "</tag>". If anyone has any ideas or suggestions, please let me know. Also, i don't know how to specify bold or italic text in vba; i used wdStyleHeading3 in the code snippet above just for testing purposes

Changing All Image Tags In Html Page
I have webbrowser control with loaded page in it.
i need to change all <img> tags
exactly i need to change src property of all image tags

i do:

Dim htImg As HTMLImg
For Each htImg In htDoc.images

????? how to change htimg src propetry ?????


also does anybody have a good reference of HTMLDocument (Microsoft HTML Object Library mshtml.tbl)?
desription off all metods, events and so on...

Removing Html Tags, And Other Unwanted Text!
Hey, I am have been looking all over the net to find a good tutorial on how to parse a url and remove all then unwanted text and tags. Can someone please help me out...

P.S. The url I want to do this with is

All I want is the Table on the site with all the names, and exchange rates for them...

Strings - UCase And LCase (with HTML Tags)
Ok, so heres the problem:

I am in the process of making a HTML editor, and I have a tool which (at the moment) converts tag case to uppercase or lowercase. The only problem is it also converts the attributes as well, which I don't want. Does anyone know how to ignore the attributes and change the case for the rest of the tag? I have included the source code that I am currently using below (for uppercase).

Oh, and btw, I'm a newbie, so plz give me some code (or tell me where I can find some) rather then tell me what vb function to use.



Here's the current code:

Sub TagUCase()
Dim txt As String
Dim tag_open As Integer
Dim tag_close As Integer
On Error GoTo ErrorHandler
rchEditor.Visible = False
Screen.MousePointer = vbHourglass
txt = rchEditor.Text
tag_close = 1
tag_open = InStr(tag_close, txt, "<")
If tag_open = 0 Then Exit Do
tag_close = InStr(tag_open + 1, txt, ">")
If tag_open = 0 Then tag_close = Len(txt)
rchEditor.SelStart = tag_open - 1
rchEditor.SelLength = tag_close - tag_open + 1
rchEditor.SelText = UCase(rchEditor.SelText)
rchEditor.SelStart = 0
rchEditor.Visible = True
Screen.MousePointer = vbNormal

rchEditor.Visible = True
Screen.MousePointer = vbNormal
Exit Sub
End Sub

Is There A Fast Way To Colorize HTML Tags In RichTextBox?
You see the question. Thanks for any help,

Changing All Image Tags In Html Page
I have webbrowser control with loaded page in it.
i need to change all <img> tags
exactly i need to change src property of all image tags

i do:
    Dim htImg As HTMLImg
    For Each htImg In htDoc.images

    ????? how to change htimg src propetry ?????


also does anybody have a good reference of HTMLDocument (Microsoft HTML Object Library mshtml.tbl)?
desription off all metods, events and so on...

WebBrowser Control Question - Tags In Html

I'm using a WebBrowser control on my form, and I load a html document using the following convention:

brwWebBrowser.Navigate App.Path + "Help.htm"

It displays the document correctly and I'm able to scroll it. However I'm using such tags in html code of this document:

<A name="start point"></A>

text text text
text text text
text text text
text text text
text text text

<A href="#start point">Jump to start</A>

When I use it to jump to the start of the document, I get an error (of my web browser) "Page cannot be displayed".

How to deal with it?

Thx in advance

Edited by - Icek on 1/3/2005 2:44:13 PM

Reading HTML Tags That Are Not There All The Time With VB6 WebBrowser
I was creating a program for one reason or another goes to a web page and finds the meta tag keywords. All was fine

But when you get to a Webpage with no Meta tag name="keywords" it crashes with "Object required" error or something like that.

I was currently using this format of code

Code:Label1.caption = Webbrowser.Document.All("keywords").content

Is there anyway to stop that error by checking if the tag exsist before acessing it?

I tried an IF statement using Webbrowser.Document.All("keywords").content but loe and behold the "Object" was "Required"

I tried it with an instance of IE aswell but just incase but it daint work

Read Meta Tags From HTML File

Iam working in a VB6 project where i will have to read each and every HTML page in a specified folder including all the sub folders and read the specified META tag data and WRITE the data into a XML file with the Hyperlinked to that HTML page.

For eg:

File name : "c: estweb1.html"

META Name ="HL"
META Name = "DocTYPE"

I would like to have the XML file generated with following details:
1. Title
2. contents of META NAME : "HL"
3. contents of META NAME : "DocTYPE"
4. HiperLink the title to "c: estweb1.html"

I will be really greatfull if somebody can send me an example to the below mentioned email id at the earliest..

Kindly help me out. Thanks a lot in advance.

Jey Ganesh

Read HTML And Update Data In Tags?
Best way to read in an html file and replace data inside tags and update the file? Can do easily with XML, not sure if similar means available for HTML.

How To Get Html Tags Formatted In Excel Sheet Cell
I have a text which contains html tags (say <b>something</b>) in the excel sheet cell, I want this text should be formatted as per html tags (i.e. something should be bold in the excel sheet cell). Also if the text in the excel sheet cell is formatted then how do i get it in html tags format.

Crystal Reports 9 - HTML Interpretation Of Image Tags (ie, &lt;img Src=...&gt;)
I have a paragraph stored in a blob field in my database and I want the ability to place an image in the middle of the paragraph when I display it in a crystal report. I turned on html interpretation to see if it would interpret an image tag like so... <img src="C:my_pic.jpg"> but it doesn't seem to read image tags. Does anyone know of any other alternatives?

Line Breaks In Output In Textbox And Html Tags
Hi i have a textbox at the top of my form which acesses a MS ACCESS 2000 database table and shows one field(non editable) of the database as we scroll through it.

A couple of our records have "<br>"html tags and html links in them to output the record with line breaks and hyperlinks.
We usually have this outputted to a html web page but would like to put in a vb program.

The text in the database looks like this as an example:
"This is line 1<b r>This is line 2<b r>this is line 3<br><a href-"">click here</a><br>"

instead of this output i would like for them to appear on 4 separate lines as its displayed. I know i could somehow use the & vbcrlf on the end.


Copyright 2005-08, All rights reserved