Copmarison loop driving me nuts!

E

Ed

I have a long block of text like this:



L5-D000001^tTEXT^p

L5-D000001^tTEXT^p

L5-D000001^tTEXT^p

L5-D000002^tTEXT^p



(^t is a tab; ^p is a hard return)



I need to compare the first text string ("L5-D000001") of each line with the
first string of the next line until it changes. I've been trying to Select
the first string, copy to the clipboard, and use the clipboard as a string
variable ("strClip") to compare with the next string, looping until the
Selection did not match strClip. When it doesn't match, the code will drop
out of the loop and run some other instructions, after which it will go back
to the first select, copy to clipboard, and compare again until it detects a
single table cell at the end of the document.



This actually did work when I put everything in a table and searched down
the first column, but I've found I can't do that; I have to work with it as
a block of text spanning about 3200 pages. And I just can't get the
comparison loop to work right.



Any and all help is appreciated.



Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top