Searching for a text variable then returning a value

R

rob b

This may be impossible but, I have a word file with around 15,000 pages, it
is maid up of notes taken by staff over a year. What I what is a macro that
will search for a text variable then having found the text search up for a
specific piece of text “ “, copy that line and past it into a second
word file. Then continue searching fro the first variable and repeat the
process copying the new line into the same “second word fileâ€

Basically I am looking to put a list of clients together that have
particular words or phrases recorded about them on a system. The client ID is
recorded at the top of every entry with a series of spaces after there id.

Thanks
 
H

Helmut Weber

Hi Rob,

hmm...
What I want is a macro that will search for a text variable
then having found the text search up for a
specific piece of text “ “, copy that line and past it into a second
word file. Then continue searching fro the first variable and repeat the
process copying the new line into the same “second word file”

No, I don't think this will work.

in doc1
Search for string01
if found ' or while ?!
search for string02 from position of string01 up
if found ' or while ?!
move line where found to doc2
that is copy, insert in doc2, delete
endif
endif

If such a large document was not created
programmatically, you will run into so
many irregularities, that whether a programmatic
approach will help you, is highly questionable.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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