Hello all,
I have an application that creates large text files. I want to create a macro that will run thru one of these large documents, find lines with a specific word in it, CUT that line and paste it into a second (initially blank) document, and then go back to the first document and do that again until all lines with that word in it are contained in the second document.
Take for instance the text below, which would represent the initial document:
Single line here with the word Jupiter in it.
Another line here with the word Jupiter in it.
Single line here with the word Mars in it.
Another line here with the word Pluto in it.
Single line here with the word Jupiter in it.
Another line here with the word Fred in it.
Single line here with the word Martha in it.
Single line here with the word Jupiter in it.
Let's say that I want to find all lines with the word Jupiter in it, and cut that entire line to my second document. Here's what I've tried that doesn't work.
I began a new macro recording
Beginning at the top of the document I do a search for Jupiter
It immediatly finds the first occurrance
I hit the Home key to go to the beginning of the line
I hit the down arrow key while simultaneously holding the shift key, which "selects" the line.
I hit the CUT button
I switch to the second document and hit PASTE
I then go back to the initial document and end the macro, naming it and also checking the repeat to tell it to keep repeating that to the end of the initial document.
When I run the macro, it "acts" like it's doing what I want (I see it quickly moving thru the main document), but nothing appears in the second document.
Using TextPad 7.5.1 btw.
Any help here would be greatly appreciated.
Thanks .....
Assistance with a macro please....
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm