I can't quite figure this one out and was hoping for some help.
Situation: HTML file lists information sorted alphabetically. Each letter of the alphabet is it's own table. The rows of info have alternating color backgrounds.
Problem 1: When new information has to be added, a new TR is created in the middle of the table, forcing me to rename the alternating colors for the whole table.
Very Short Sample HTML:
Here is the Macro that I made that ALMOST does the job:
Problem 2: Each letter is it's own table and the first row of each table needs to be color1. With this macro, every other row is replaced throughout the whole file. Resulting in:
When what I really need is for the first row of the D table to start as color1.
I don't know if UE does this, but I was thinking along the lines of:
Loop from "<table"
Do the Find and Replace
Until "</table>"
Repeat until EoF
Can any of the experts here help me out? Thanks!
Situation: HTML file lists information sorted alphabetically. Each letter of the alphabet is it's own table. The rows of info have alternating color backgrounds.
Problem 1: When new information has to be added, a new TR is created in the middle of the table, forcing me to rename the alternating colors for the whole table.
Very Short Sample HTML:
Code: Select all
<a name="c">C</a>
<table cellpadding="1" cellspacing="0" border="0" width="100%">
<tr class="color1"><td>C Info 1</td></tr>
<tr class="color2"><td>C Info 2</td></tr>
<tr class="color1"><td>C Info 3</td></tr>
<tr class="color2"><td>C Info 4</td></tr>
</table>
Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOff
Find "<tr class="color2"><td>"
Replace All SelectText "<tr class="color1"><td>"
Find " class="color1""
Find " class="color1""
Replace "class="color2""
Code: Select all
<a name="c">C</a>
<table cellpadding="1" cellspacing="0" border="0" width="100%">
<tr class="color1"><td>C Info 1</td></tr>
<tr class="color2"><td>C Info 2</td></tr>
<tr class="color1"><td>C Info 3</td></tr>
</table>
<a name="d">D</a>
<table cellpadding="1" cellspacing="0" border="0" width="100%">
<tr class="color2"><td>D Info 1</td></tr>
<tr class="color1"><td>D Info 2</td></tr>
<tr class="color2"><td>D Info 3</td></tr>
</table>
I don't know if UE does this, but I was thinking along the lines of:
Loop from "<table"
Do the Find and Replace
Until "</table>"
Repeat until EoF
Can any of the experts here help me out? Thanks!