Re: string search and insert
Read up on the following functions :
open
print
line input (or was it 'input line'?)
replace
instr
close
You should be able to code a loop to replace the fonts as required (if they are htmlm files).
Or you can open in word and use its replace function. Similar code, but uh well word may sorta do things to the html code whilst it saves it.
Your choice
Re: string search and insert
You're going to have to find the tag (hopefully the same tag for all) that encapsulates the string:
<FONT FACE="CustomFont 1" SIZE=2>2 </FONT>3 4
You will have to parse out the string then to find any hanging text after the </FONT> tag.
Can you provide a little more of the HTML ... what tag encapsulates the string you provided?
Re: string search and insert
Hi,
Webtest: The html goes like this
<DIV CLASS=T1>
<FONT FACE="Goudy" SIZE=2>(206 </FONT><FONT FACE="Custom Symbol 1" SIZE=2>2</FONT><FONT FACE="Goudy" SIZE=2> 190)/190 </FONT><FONT FACE="Custom Symbol 1" SIZE=2>5</FONT><FONT FACE="Goudy" SIZE=2> 8 percent.</FONT>
</DIV>
Now in the line
<FONT FACE="Custom Symbol 1" SIZE=2>5</FONT>
here i have one value "5"
sometimes i might get 3 values
eg: <FONT FACE="Custom Symbol 1" SIZE=2>5 2 3</FONT>
Such occurances must be replacd like this.
<FONT FACE="Custom Symbol 1" SIZE=2>5</FONT>
<FONT FACE="Custom Symbol 1" SIZE=2>2</FONT>
<FONT FACE="Custom Symbol 1" SIZE=2>3</FONT>
I am new to VBA and i have just written some basic code till date. and since time is a constraint, this would really help me out,
Thanks in advance