Now that I have got my paragraph and pasted it into my new document, I would like to do it again with other names. I was thinking of a loop or a do while loop. So I have created an array. TheNames= Array (joe, Harry, Ann) --How do I get the count of TheNames repeat with i from 1 to count of TheName--sorry for thr applescript syntax Find the name -- Im not sure of the VBA syntax here copy paste into new doc come back to original- end repeat Many Thanks again -- Posted using the http://www.macforumz.com interface, at author's request Articles individually checked for conformance to usenet standards Topic URL: http://www.macforumz.com/Word-6-7-Macros-default-ftopict149841.html Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.macforumz.com/eform.php?p=591298
"Sting2500" wrote in message news:2_591298_039df29d30b2c3c8c40c2aa7348985ed@macforumz.com... > Now that I have got my paragraph and pasted it into my new document, I > would like to do it again with other names. I was thinking of a loop > or a do while loop. So I have created an array. > > TheNames= Array (joe, Harry, Ann) > --How do I get the count of TheNames > > repeat with i from 1 to count of TheName--sorry for thr applescript > syntax > Find the name > -- Im not sure of the VBA syntax here > copy > paste into new doc > come back to original- > end repeat Dim TheNames As Variant Dim i As Long Dim myrange As Range TheNames = Array("Joe", "Harry", "Ann") For i = LBound(TheNames) To UBound(TheNames) 'your code in here 'use TheNames(i) for the search text Next i -- Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org