trichview.com

trichview.support




Search & Replace with tables.


Return to index


Author

Message

MrCraig

Posted: 02/11/2004 20:26:10


Hi,

The following code is supposed to locate html-like tags (in this case the

<%DATE:options> tag) and replace them. It appears to work fine, except when

the tags are within a table cell. When this code comes across a tag within a

table it seems to either ignore it, or the InsertText method inserts After

the table.  I've looked at the Find/Find Next code in various examples and

can't see what is happening differently in my code.



RichViewEdit1.SetSelectionBounds(0,RichViewEdit1.GetOffsBeforeItem(0),0,Rich

ViewEdit1.GetOffsBeforeItem(0));

While RichViewEdit1.SearchText('<%DATE',[rvseoDown]) do

       Begin

       RichViewEdit1.GetSelectionBounds( aStartItemNo, aStartItemOffs,

aEndItemNo, aEndItemOffs, False);

       RichViewEdit1.SearchText('>',[rvseoDown]);

       RichViewEdit1.GetSelectionBounds( bStartItemNo, bStartItemOffs,

bEndItemNo, bEndItemOffs, True);

       RichViewEdit1.SetSelectionBounds( aStartItemNo, aStartItemOffs,

bEndItemNo, bEndItemOffs);

       S:=RichViewEdit1.GetSelText;

       RichViewEdit1.InsertText(DateDecoder(S),False);

       End;


Appreciate any insights...

                                        MrCraig





Powered by ABC Amber Outlook Express Converter