M
Martin Müller
Dear experts,
I want to implement a loop to find certain strings within
two documents alternatively AND have a condition to exit
the loop. The intention is to figure out, if a certain
type of string, found in the first document, is present in
the other, continuing so until the end of the former
document is reached. As far as I have got, this requires
the command sequence
Selection.Find....
...
Selection.Find.Execute
(now a string behind the selection is read out and put
into a variable)
Windows(<second window>).Activate
Selection.Find.Text = <variable>
....
Selection.Find.Execute
Windwows(<former window>).Activate
(write the page number of the found string into the first
document)
all embedded within a loop
Now, since the method Selection.Find... must be used in
both the documents, the loop exit condition
Until Selection.Find.Found = False does not work in the
first document, neither the .Find.Execute boolean.
How can the Selection.Find.Found Property be kept for one
document, although I utilize a Selection.Find method also
in the second? By moving the search in the second to a
certain subroutine?
Best regards and thank you
Martin
I want to implement a loop to find certain strings within
two documents alternatively AND have a condition to exit
the loop. The intention is to figure out, if a certain
type of string, found in the first document, is present in
the other, continuing so until the end of the former
document is reached. As far as I have got, this requires
the command sequence
Selection.Find....
...
Selection.Find.Execute
(now a string behind the selection is read out and put
into a variable)
Windows(<second window>).Activate
Selection.Find.Text = <variable>
....
Selection.Find.Execute
Windwows(<former window>).Activate
(write the page number of the found string into the first
document)
all embedded within a loop
Now, since the method Selection.Find... must be used in
both the documents, the loop exit condition
Until Selection.Find.Found = False does not work in the
first document, neither the .Find.Execute boolean.
How can the Selection.Find.Found Property be kept for one
document, although I utilize a Selection.Find method also
in the second? By moving the search in the second to a
certain subroutine?
Best regards and thank you
Martin