Searching using data from clipboard (Macro)
Posted: Tue May 23, 2006 9:32 pm
Hi all,
I have been very impressed with the expertise found in this forum.
I have a question. I hope someone can help me.
I am trying to write a macro that is capable of pasting variable data (the content of the clipboard) into the search command.
For example:
in document 1 I will have:
John Martin | Licence# 12345|
Karl Michael | Licence# 3456657|
Jane Smith | Licence # 656789|
.
.
.
In document 2 I will have:
Member name: #12345 - status: paid - gender : male - age 24
Member name: #3456657 - status: owing - gender: male - age 56
Member name: #656789 - status: owing - gender: female - age 27
.
.
.
I would like to be able to
-search sequentially in doc 1 for a licence # (e.g. 12345),
-copy the name correspoding to licence 12345 (John Martin).
- go to document 2 and do a search for the string 12345
- replace the word "Member name" for the content of the clipboard (John Martin)
In the end, my document 2 would look like this:
John Martin: #12345 - status: paid - gender : male - age 24
Karl Michael: #3456657 - status: owing - gender: male - age 56
Jane Smith: #656789 - status: owing - gender: female - age 27
Thanks for any help you could lend me.
Regards,
Raoul
I have been very impressed with the expertise found in this forum.
I have a question. I hope someone can help me.
I am trying to write a macro that is capable of pasting variable data (the content of the clipboard) into the search command.
For example:
in document 1 I will have:
John Martin | Licence# 12345|
Karl Michael | Licence# 3456657|
Jane Smith | Licence # 656789|
.
.
.
In document 2 I will have:
Member name: #12345 - status: paid - gender : male - age 24
Member name: #3456657 - status: owing - gender: male - age 56
Member name: #656789 - status: owing - gender: female - age 27
.
.
.
I would like to be able to
-search sequentially in doc 1 for a licence # (e.g. 12345),
-copy the name correspoding to licence 12345 (John Martin).
- go to document 2 and do a search for the string 12345
- replace the word "Member name" for the content of the clipboard (John Martin)
In the end, my document 2 would look like this:
John Martin: #12345 - status: paid - gender : male - age 24
Karl Michael: #3456657 - status: owing - gender: male - age 56
Jane Smith: #656789 - status: owing - gender: female - age 27
Thanks for any help you could lend me.
Regards,
Raoul