View Single Post
 
Old 05-01-2018, 05:52 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,260
Guessed has a spectacular aura aboutGuessed has a spectacular aura aboutGuessed has a spectacular aura about
Default

In that case, you are approaching this the wrong way. The array is achieving nothing for you.

My concept of the macro is:
1. Use Greg's code to find each instance and tag the text with an incrementing bookmark name eg head1, head2, head3
2. Create the table
3. Loop through rows 2 onwards. In cell 1 put in a field {Ref head1}. In cell 2 put in a field {PageRef head1}. Increment the bookmark name on each subsequent row
Job done
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote